* PHP-XMLRPC "wrapper" functions\r
* Generate stubs to transparently access xmlrpc methods as php functions and viceversa\r
*\r
- * @version $Id: xmlrpc_wrappers.inc,v 1.13 2008/09/20 01:23:47 ggiunta Exp $\r
* @author Gaetano Giunta\r
- * @copyright (C) 2006-2009 G. Giunta\r
+ * @copyright (C) 2006-2013 G. Giunta\r
* @license code licensed under the BSD License: http://phpxmlrpc.sourceforge.net/license.txt\r
*\r
* @todo separate introspection from code generation for func-2-method wrapping\r
}\r
\r
$exists = false;\r
+ if (is_string($funcname) && strpos($funcname, '::') !== false)\r
+ {\r
+ $funcname = explode('::', $funcname);\r
+ }\r
if(is_array($funcname))\r
{\r
if(count($funcname) < 2 || (!is_string($funcname[0]) && !is_object($funcname[0])))\r
$plainfuncname = get_class($funcname[0]) . '->' . $funcname[1];\r
}\r
$exists = method_exists($funcname[0], $funcname[1]);\r
+ if (!$exists && version_compare(phpversion(), '5.1') < 0)\r
+ {\r
+ // workaround for php 5.0: static class methods are not seen by method_exists\r
+ $exists = is_callable( $funcname );\r
+ }\r
}\r
else\r
{\r
error_log('XML-RPC: method to be wrapped is the constructor: '.$plainfuncname);\r
return false;\r
}\r
- if($func->isDestructor())\r
+ // php 503 always says isdestructor = true...\r
+ if( version_compare(phpversion(), '5.0.3') != 0 && $func->isDestructor())\r
{\r
error_log('XML-RPC: method to be wrapped is the destructor: '.$plainfuncname);\r
return false;\r