$_params
$_params : array
All driver-specific parameters.
The Horde_Rpc class provides a set of server and client methods for RPC communication.
TODO:
EXAMPLE:
$response = Horde_Rpc::request('xmlrpc',
'http://localhost:80/horde/rpc.php',
'contacts.search',
$transport_client,
array(array('jan'), array('localsql'),
array('name', 'email')));
authorize() : boolean
Check authentication. Different backends may handle authentication in different ways. The base class implementation checks for HTTP Authentication against the Horde auth setup.
Returns true if authentication is successful. Should send appropriate "not authorized" headers or other response codes/body if auth fails, and take care of exiting.
getInput() : mixed
Get the request body input. Different RPC backends can override this to return an open stream to php://stdin, for instance - whatever is easiest to handle in the getResponse() method.
The base class implementation looks for $HTTP_RAW_POST_DATA and returns that if it's available; otherwise, it returns the contents of php://stdin.
The input - a string (default), a filehandle, etc.
request(string $driver, string|\Horde_Url $url, string $method, mixed $client, array $params = null) : mixed
Builds an RPC request and sends it to the RPC server.
This statically called method is actually the RPC client.
string | $driver | The protocol driver to use. Currently 'soap', 'xmlrpc' and 'jsonrpc' are available. |
string|\Horde_Url | $url | The path to the RPC server on the called host. |
string | $method | The method to call. |
mixed | $client | An appropriate request client for the type of request. (Horde_Http_Request, SoapClient etc..) |
array | $params | A hash containing any necessary parameters for the method call. |
The returned result from the method
factory(mixed $driver, $request, array $params = null) : \Horde_Rpc
Attempts to return a concrete RPC server instance based on $driver.
mixed | $driver | The type of concrete Horde_Rpc subclass to return. |
$request | ||
array | $params | A hash containing any additional configuration or connection parameters a subclass might need. |
The newly created concrete Horde_Rpc server instance, or an exception if there is an error.