You are here

function clients_connection_base::callMethod in Web Service Clients 7.3

Same name and namespace in other branches
  1. 6.2 clients.inc \clients_connection_base::callMethod()
  2. 7.2 clients.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

includes/clients.entity.inc, line 213
Provides base classes for clients handler entities.

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);
}