ZF-7587: Amf setClass() ignores pre-initialized objects and creates new objects
I need to set paramets into the __constructor of my PHP object before passing it off to Zend to use it as a Remote Procedure Call.
This works in Zend_Json but not in Zend_Amf. To do this with the Zend_JSON class I just create my object and pass it along as $this->server->setClass($object) and it will use that object in Zend/Server/Abstract.php method _displatch for $object = $invocable->getObject();
Instead the Zend_Amf_Server class overrides the Abstract _dispatch call and ignores the class I passed it. Instead it always calls $object = $info->getDeclaringClass()->newInstance();
Thus is creates a new instance and I am unable to use dependancy injection to establish my object.