老葛的Drupal培训班 Think in Drupal
system.methodSignature
这个内置的Drupal XML-RPC方法返回一个数据类型的数组.列表中的第一个是函数返回值的数据类型;接着是给定方法所需的任意参数.例如, remoteHello.hello方法返回了一个字符串,并期望一个参数:一个包含了客户端名称的字符串.让我们调用system.methodSignature来看看Drupal是不是这样的.
// Get the method signature for our example method.
$signature = xmlrpc($url, 'system.methodSignature', 'remoteHello.hello');
果然, $signature的值变成了一个数组:('string', 'string').
system.methodHelp
这个内置的Drupal XML-RPC方法,返回xmlrpc钩子中定义的方法的描述.
// Get the help string for our example method.
$help = xmlrpc($url, 'system.methodHelp', 'remoteHello.hello');
$help的值现在是一个字符串: Greets XML-RPC clients by name.
system.getCapabilities
这个内置的Drupal XML-RPC方法描述了Drupal的XML-RPC服务器能力,这里根据实现的规格进行描述. Drupal实现了以下规格:
xmlrpc:
specVersion 1
faults_interop:
specVersion 20010516
system.multicall
specVerson 1
introspection
specVersion 1
system.multiCall