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
Post a Comment