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

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

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -