Zend Framework

ease change of result class

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.10.2
  • Fix Version/s: None
  • Component/s: Zend_Rest_Client
  • Labels:
    None

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());
    }

Activity

Hide
Remy Damour added a comment -

patch with proposed solution, against v1.10.1

Show
Remy Damour added a comment - patch with proposed solution, against v1.10.1

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: