wppaste
WordPress

IXR_IntrospectionServer

Since
1.5.0
Source
wp-includes/IXR/class-IXR-introspectionserver.php:9
IXR_IntrospectionServer

Compatibility

WordPress
since 1.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 2

$signaturespublic
$helppublic

Methods · 6

Source code

class IXR_IntrospectionServer extends IXR_Server{    var $signatures;    var $help; 	/**	 * PHP5 constructor.	 */    function __construct()    {        $this->setCallbacks();        $this->setCapabilities();        $this->capabilities['introspection'] = array(            'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',            'specVersion' => 1        );        $this->addCallback(            'system.methodSignature',            'this:methodSignature',            array('array', 'string'),            'Returns an array describing the return type and required parameters of a method'        );        $this->addCallback(            'system.getCapabilities',            'this:getCapabilities',            array('struct'),            'Returns a struct describing the XML-RPC specifications supported by this server'        );        $this->addCallback(            'system.listMethods',            'this:listMethods',            array('array'),            'Returns an array of available methods on this server'        );        $this->addCallback(            'system.methodHelp',            'this:methodHelp',            array('string', 'string'),            'Returns a documentation string for the specified method'        );    } 	/**	 * PHP4 constructor.	 */	public function IXR_IntrospectionServer() {		self::__construct();	}     function addCallback($method, $callback, $args, $help)    {        $this->callbacks[$method] = $callback;        $this->signatures[$method] = $args;        $this->help[$method] = $help;    }     function call($methodname, $args)    {        // Make sure it's in an array        if ($args && !is_array($args)) {            $args = array($args);        }         // Over-rides default call method, adds signature check        if (!$this->hasMethod($methodname)) {            return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');        }        $method = $this->callbacks[$methodname];        $signature = $this->signatures[$methodname];        $returnType = array_shift($signature);         // Check the number of arguments        if (count($args) != count($signature)) {            return new IXR_Error(-32602, 'server error. wrong number of method parameters');        }         // Check the argument types        $ok = true;        $argsbackup = $args;        for ($i = 0, $j = count($args); $i < $j; $i++) {

Changelog

Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/IXR/class-IXR-introspectionserver.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.