Issues

ZF-2589: __construct demands endpoint, no options to recycle object

Description

It would be nice if I could create a {{Zend_XmlRpc_Client}} without passing a URL to the {{__construct}}.

Reason - I like to re-use my objects and didn't want to set up another client for every request I am doing (and I have 5 or so to different endpoints). So ideally I'd like to create a {{Zend_XmlRpc_Client}} without an endpoint and I would like to set another endpoint when I need.

For example:


$client = new Zend_XmlRpc_Client();
...
$client->setEndpoint('http://foo/bar/');
...
$client->setEndpoint('http://bar/foo');
...

Comments

Scheduling for first mini-release following 1.5.0GA release.

Re-scheduling; bigger change than originally assumed, and could introduce BC issues.

Scheduling for next minor release.

Any headsup?

Till, I would like not to provide this option. It's not expensive to create a new client object and it makes it much harder - or impossible - to verify invariance of the client object. I can only guess your usecase, but if you need to access different XML/RPC endpoints through one object I would suggest to create something like Till_XmlRpc_Composite which takes a map with namespaces as keys and XML/RPC client objects as values and dispatch the calls accordingly. Does that sound like a solution for you?