added possibility to set the attributes parameter as an array or object

Signed-off-by: dododedodonl <phpscripter.dodo@gmail.com>