abuddy/settee — comment on commit 536f361bcfe73743be01a8829e0e217c48b751ab
File:  line 0
By abuddy:

Maybe consider adding array support?

if(is_array($document)) {
$document = (object) $document;
}

Placing the code above in functions body will do the trick.
Passing an array looks just more prettier than an object.