ZF-6790: Control AMF serialization depth of an object tree
In our project we want to control how far the Zend_Amf_Serializer digs in an object tree. Because in some cases we can have a very deep tree dumped in the AMF stream... For instance, something like this would be awesome :
$server = new Zend_Amf_Server(); $server->serializationDepth = 3; echo ($server->handle());
Besides, rather than just replacing too-deep objects by null, the serializer could replace them by an object indicating that the object has to be loaded (kind of lazy-loading)
I am not sure if there are already patterns for these behaviors (I did not find any on Java's RMI... but I am certainly no expert).