[eluser]jedd[/eluser]
[quote author="j2more" date="1255821032"]
What about situations where you would just like a convinient way to return multiple Objects from a method but.
[/quote]
[quote author="j2more" date="1260858373"]
Eg. you return already an array ...
[/quote]
Return already? I thought you were talking about a situation where you want to return multiple objects from
a method? If you are happy to call multiple methods to get individual objects on each call, then, yeah, sure, why not. Doesn't seem very elegant to me, though.
Quote:...or you want to use the object way later in the code without passing it along all the invocation graph.
An array of objects means you can easily extract / copy / use the object that came back inside the array (of objects).
I still believe this is a cleaner approach than subverting the return $value mechanism by wedging some data into the Session space in the model, then looking for it later in the controller.
If you want to go a bit more OO, then have the model populate a bunch of attributes, and then refer to them from the controller.