cvs: pear /XML_RPC Server.php
| From: | Daniel Convissor | Date: | Tue, 22 Feb 2005 01:15:26 +0000 |
| Subject: | cvs: pear /XML_RPC Server.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29644@lists.php.net to get a copy of this message | ||
danielc Mon Feb 21 20:15:26 2005 EDT
Modified files:
/pear/XML_RPC Server.php
Log:
* Allow class methods to be mapped using either syntax:
'function' => 'hello::sayHello',
or
'function' => array('hello', 'sayhello'),
Fixes problem introduced in v 1.7 of Server.php.
The string syntax was the only way to do it in
Release 1.1.0. But the problematic change caused
the array syntax to be the only way to do it.
Bug 3363.
http://cvs.php.net/diff.php/pear/XML_RPC/Server.php?r1=1.15&r2=1.16&ty=u
Index: pear/XML_RPC/Server.php
diff -u pear/XML_RPC/Server.php:1.15 pear/XML_RPC/Server.php:1.16
--- pear/XML_RPC/Server.php:1.15 Sun Jan 23 22:47:55 2005
+++ pear/XML_RPC/Server.php Mon Feb 21 20:15:26 2005
@@ -31,7 +31,7 @@
* @author Stig Bakken <stig@php.net>
* @author Martin Jansen <mj@php.net>
* @copyright 1999-2001 Edd Dumbill
- * @version CVS: $Id: Server.php,v 1.15 2005/01/24 03:47:55 danielc Exp $
+ * @version CVS: $Id: Server.php,v 1.16 2005/02/22 01:15:26 danielc Exp $
* @link http://pear.php.net/package/XML_RPC
*/
@@ -400,6 +400,7 @@
eval('$m->addParam(' . $XML_RPC_xh[$parser]['params'][$i] .
');');
}
XML_RPC_Server_debugmsg($plist);
+
// now to deal with the method
$methName = $XML_RPC_xh[$parser]['method'];
if (strpos($methName, 'system.') === 0) {
@@ -409,6 +410,14 @@
$dmap = $this->dmap;
$sysCall = 0;
}
+
+ if (is_string($dmap[$methName]['function'])
+ && strpos($dmap[$methName]['function'], '::') !==
false)
+ {
+ $dmap[$methName]['function'] =
+ explode('::', $dmap[$methName]['function']);
+ }
+
if (isset($dmap[$methName]['function'])
&& is_callable($dmap[$methName]['function']))
{