function clients_connection_base::callMethod in Web Service Clients 7.2
Same name and namespace in other branches
- 6.2 clients.inc \clients_connection_base::callMethod()
- 7.3 includes/clients.entity.inc \clients_connection_base::callMethod()
Call a remote method.
This is a wrapper around callMethodArray that gives the convenience of being able to pass method name and parameters as one flat list, and hence is the main API for connection objects.
Parameters
$method: The name of the remote method to call.
...: All other parameters are passed to the remote method.
Return value
Whatever is returned from the remote site.
Throws
Exception on error from the remote site.
File
- ./
clients.inc, line 131 - Contains basic classes for client connections.
Class
- clients_connection_base
- Base class for client connections.
Code
function callMethod($method) {
// Get all the arguments this function has been passed.
$function_args = func_get_args();
// Slice out the ones that are arguments to the method call: everything past
// the 1st argument.
$method_params = array_slice($function_args, 1);
return $this
->callMethodArray($method, $method_params);
}