Constructor.
Horde_RPC_jsonrpc
Horde_RPC_jsonrpc
([ $params = array()], array $config)
-
array
$config: A hash containing any additional configuration or connection parameters this class might need.
-
$params
Sends an RPC request to the server and returns the result.
string
getResponse
(string $request)
-
string
$request: The raw request string.
Redefinition of:
- Horde_RPC::getResponse()
- Sends an RPC request to the server and returns the result.
Builds an JSON-RPC request and sends it to the server.
This statically called method is actually the JSON-RPC client.
mixed
request
(string $url, string $method, [array $params = null], [$options $options = array()])
-
string
$url: The path to the JSON-RPC server on the called host.
-
string
$method: The method to call.
-
array
$params: A hash containing any necessary parameters for the method call.
-
$options
$options: Optional associative array of parameters which can be:
- user - Basic Auth username
- pass - Basic Auth password
- proxy_host - Proxy server host
- proxy_port - Proxy server port
- proxy_user - Proxy auth username
- proxy_pass - Proxy auth password
- timeout - Connection timeout in seconds.
- allowRedirects - Whether to follow redirects or
not
- maxRedirects - Max number of redirects to
follow
Redefinition of:
- Horde_RPC::request()
- Builds an RPC request and sends it to the RPC server.
Converts stdClass object to associative arrays.
mixed
_objectsToArrays
($data $data)
-
$data
$data: mixed Any stdClass object, array, or scalar.
Returns a specially crafted PEAR_Error object containing a JSON-RPC response in the error message.
PEAR_Error
_raiseError
(string|PEAR_Error $error, stdClass $request)
-
string|PEAR_Error
$error: The error message or object.
-
stdClass
$request: The original request object.
Inherited Methods
Inherited From Horde_RPC
Horde_RPC::Horde_RPC()
Horde_RPC::authorize()
Horde_RPC::factory()
Horde_RPC::getInput()
Horde_RPC::getResponse()
Horde_RPC::getResponseContentType()
Horde_RPC::request()