xmlrpc_server_method_signature
includes/xmlrpcs.inc, строка 292
- Версии
- 5 – 6
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.
Код
<?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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии