| Versionen | |
|---|---|
| drupal6 – drupal7 | xmlrpc_server_method_signature($methodname) |
XML-RPC method system.methodSignature maps to this function.
$methodname Name of method for which we return a method signature.
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.
includes/
<?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;
}
?>
Kommentare
Kommentar hinzufügen