Issues

ZF-9316: ease change of result class

Issue Type: Improvement Created: 2010-03-03T14:58:56.000+0000 Last Updated: 2012-11-20T21:37:27.000+0000 Status: Open Fix version(s): Reporter: Remy Damour (remy215) Assignee: None Tags: - Zend_Rest_Client

Related issues: Attachments: - Client.php.diff

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):

<pre class="highlight">
    public function __call($method, $args)
    {
        [...]
        return new Zend_Rest_Client_Result($response->getBody());
    }

Comments

Posted by Remy Damour (remy215) on 2010-03-03T16:00:41.000+0000

patch with proposed solution, against v1.10.1

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts