function xmlrpc_example_xmlrpc
Same name in other branches
- 7.x-1.x xmlrpc_example/xmlrpc_example.module \xmlrpc_example_xmlrpc()
Implements hook_xmlrpc().
Provides Drupal with an array to map XML-RPC callbacks to the functions implemented by this module.
See also
hook_xmlrpc()
Related topics
File
-
xmlrpc_example/
xmlrpc_example.module, line 131
Code
function xmlrpc_example_xmlrpc() {
$methods[] = array(
'xmlrpc_example.add',
// Method name
'_xmlrpc_example_server_add',
// Callback to execute
array(
// Array of types for output/input parameteres
'int',
// the type of the return value
'int',
// the type of the first argument
'int',
),
t('Returns the sum of the two arguments.'),
);
// The subtract method is similiar to the addition
$methods[] = array(
'xmlrpc_example.subtract',
'_xmlrpc_example_server_subtract',
array(
'int',
'int',
'int',
),
t('Return difference of the two arguments.'),
);
return $methods;
}