Welcome Guest, Not a member yet? Register   Sign In
why does Entity::fill() only accept arrays?
#1

is there any particular reason Entity::fill() is made to only accept arrays but not objects?
it seems to me it should be possible to fill an entity from an object (for example when data is sent via API in a json) by iterating through its properties
otherwise I have to do $myEntity->fill((array)$objectData);
Reply
#2

PHP Code:
$myEntity->fill($request->getJSON(true)); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB