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

Issue Type: Improvement Created: 2008-02-06T15:31:03.000+0000 Last Updated: 2009-08-22T09:21:45.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Till Klampaeckel (till) Assignee: Lars Strojny (lars) Tags: - Zend_XmlRpc_Client

Related issues: Attachments:


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:

<pre class="highlight">
$client = new Zend_XmlRpc_Client();
$client->setEndpoint('<a href="http://foo/bar/">http://foo/bar/</a>');
$client->setEndpoint('<a href="http://bar/foo">http://bar/foo</a>');


Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T10:15:59.000+0000

Scheduling for first mini-release following 1.5.0GA release.

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-21T16:40:24.000+0000

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

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-22T11:09:37.000+0000

Scheduling for next minor release.

Posted by Till Klampaeckel (till) on 2008-07-21T22:55:20.000+0000

Any headsup?

Posted by Lars Strojny (lars) on 2009-08-22T08:06:59.000+0000

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?

Have you found an issue?

See the Overview section for more details.


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

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