symfony - Convert Doctrine 2 result object (entity) to array? -


i know possible specify want array type instead of object type when run query doctrine. however, happen working code can't edit returns me result query object , want able convert array somehow. seems in older version doctrine used have toarray() can used.

is there similar can use?

no, doctrine 2 uses data mapper pattern , doesn't make assumptions php class. if class doesn't provide toarray() method explicitly, you'd need create array manually object's getter methods.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -