You are here

function _xmlrpc_example_alter_add in xmlrpc 8

Sum the two arguments without limit checking.

This is the replacement callback for the xmlrpc_example.add xmlrpc method.

Now we define the custom callbacks replacing the original defined by the altered methods: xmlrpc_example.add and _xmlrpc_example.subtract. These new callbacks will not check if the result of the operation is within the limits defined by the server and will always return value of the operation.

Parameters

int $num1: First number.

int $num2: Second number.

Return value

int The sum of the arguments

Related topics

1 string reference to '_xmlrpc_example_alter_add'
xmlrpc_example_xmlrpc_alter in xmlrpc_example/xmlrpc_example.module
Implements hook_xmlrpc_alter().

File

xmlrpc_example/xmlrpc_example.module, line 260
Module file for xmlrpc_example module.

Code

function _xmlrpc_example_alter_add($num1, $num2) {
  return $num1 + $num2;
}