xmlrpc_server_method_signature

Versions
4.6 – 7
xmlrpc_server_method_signature($methodname)

XML-RPC method system.methodSignature maps to this function.

Parameters

$methodname Name of method for which we return a method signature.

Return value

array An array of types representing the method signature of the function that the methodname maps to. The methodSignature of this function is 'array', 'string' because it takes an array and returns a string.

Code

includes/xmlrpcs.inc, line 292

<?php
function xmlrpc_server_method_signature($methodname) {
  $xmlrpc_server = xmlrpc_server_get();
  if (!isset($xmlrpc_server->callbacks[$methodname])) {
    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array("@methodname" => $methodname)));
  }
  if (!is_array($xmlrpc_server->signatures[$methodname])) {
    return xmlrpc_error(-32601, t('Server error. Requested method @methodname signature not specified.', array("@methodname" => $methodname)));
  }
  // We array of types
  $return = array();
  foreach ($xmlrpc_server->signatures[$methodname] as $type) {
    $return[] = $type;
  }
  return $return;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.