Easy way to convert a Doctrine_Collection of Model classes to an array of simple objects?
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-05-18T06:18:33Z
Indexed on
2010/05/18
6:20 UTC
Read the original article
Hit count: 163
To clearly separate the Controller and View layers, I do not longer want to pass full objects to my views. Instead I want to pass only arrays and objects that contain the data but do not have any methods. Otherwise a view script would be able to delete Doctrine records or traverse in the object tree to data that was not intended for the view.
© Stack Overflow or respective owner