ZF-9316: ease change of result class

Description

With current version of ZF (1.10.2), it is very hard (not to say impossible) to make Zend_Rest_Client use a result class other than Zend_Rest_Client_Result.

In my case, I only need to customize Zend_Rest_Client_Result => I subclass it, but I am not able to make Zend_Rest_Client use this class.

It would be a great increase in flexibility if result-classname was no longer hardcoded, for example storing name of result-class into a property of Zend_Rest_Client so that it could be easily changed.

Culprit seems to be this line (from Zend_Rest_Client.php):


    public function __call($method, $args)
    {
        [...]
        return new Zend_Rest_Client_Result($response->getBody());
    }

Comments

patch with proposed solution, against v1.10.1