IXR_IntrospectionServer::methodSignature() WordPress Method
The IXR_IntrospectionServer::methodSignature() method is used to return an array containing the return type and parameters of a specific XML-RPC method. This can be useful for debugging purposes or for creating client code that is aware of the methods and parameters available on the server.
IXR_IntrospectionServer::methodSignature( $method ) #
Source
File: wp-includes/IXR/class-IXR-introspectionserver.php
function methodSignature($method) { if (!$this->hasMethod($method)) { return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.'); } // We should be returning an array of types $types = $this->signatures[$method]; $return = array(); foreach ($types as $type) { switch ($type) { case 'string': $return[] = 'string'; break; case 'int': case 'i4': $return[] = 42; break; case 'double': $return[] = 3.1415; break; case 'dateTime.iso8601': $return[] = new IXR_Date(time()); break; case 'boolean': $return[] = true; break; case 'base64': $return[] = new IXR_Base64('base64'); break; case 'array': $return[] = array('array'); break; case 'struct': $return[] = array('struct' => 'struct'); break; } } return $return; }
Expand full source codeCollapse full source codeView on TracView on GitHub