FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18258&edit=1

ID: 18258
Updated by: sergiosgc@gmail.com
Reported By: chris at smartt dot com
Summary: Can not call remote function called create() because
XML_RPC2_Client::create()
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: XML_RPC2
Package Version: 1.0.6
PHP Version: 5.3.1
-Assigned To:
+Assigned To: sergiosgc
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: sergiosgc
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

I worked around the PHP static/non-static signature problem by testing
for $this being set in the create() method. The result is that the
factory method no longer pollutes the XML-RPC proxy class. You may call
create directly on your proxy and the method call will be routed through
rpc.

The fix is revision 308646.


Previous Comments:
------------------------------------------------------------------------

[2011-02-10 02:36:23] chrisatsmartt

Description:
------------
Can not call remote function called create() because
XML_RPC2_Client::create() already exists.

create() should optimally be renamed create___() like the others
functions in this class, or the constructor should be used. Alternately
the static create factory class could be moved to some utility class.

In theory there shouldn't be a conflict since create() is static and the
remote functions are not, but php seems to call it in an object context
regardless.

The workaround I'm using is to call remoteCall___ directly, but it leads
to somewhat ugly syntax, and create() is a function name I would expect
to be a reasonably common choice in various remote APIs.


$result = $client->create(array('parent_type' => 'global',
'parent_path' => '', 'type' => 'domain', 'name' => $domain);

has to become

$result = $client->remoteCall___('create', array(array('parent_type'
=> 'global', 'parent_path' => '', 'type' => 'domain', 'name' =>
$domain)));

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 24, '11 at 10:09p
activeFeb 24, '11 at 10:09p
posts1
users1
websitepear.php.net

1 user in discussion

Sergiosgc: 1 post

People

Translate

site design / logo © 2022 Grokbase