[dev] Rdo array Access.

Chuck Hagenbuch chuck at horde.org
Sat Jun 9 19:39:57 UTC 2007


Quoting Duck <duck at obala.net>:

> Why the RDO array access support was dropped?  This broke some my scripts as
> RDO object or better PDO instances  cannot be serialized and so stored. So as
> is not possible to store it an a cache them you must convert the data into an
> array. Now we are forced to check every to a data is passed in a function, to
> use different approaches if the data passed are an object  or an array (newly
> constructed of used read from cache).

It was dropped because I couldn't see a good use for it. You can get  
an array from any RDO object by using $ob->getIterator->getArrayCopy()  
(and this will include relationships, etc.).

What's a small example case of where array access to object properties  
helps you? What does serialization have to do with it (we can just  
exclude mappers from what is serialized in Rdo objects - that's  
probably a good idea anyway).

-chuck


More information about the dev mailing list