Method | Description | |
---|---|---|
_objectsToArrays ( $data ) : mixed | Converts stdClass object to associative arrays. | |
_raiseError ( string | PEAR_Error $error, stdClass $request ) : PEAR_Error | Returns a specially crafted PEAR_Error object containing a JSON-RPC response in the error message. | |
getResponse ( $request ) : string | Sends an RPC request to the server and returns the result. | |
getResponseContentType ( ) : string | Returns the Content-Type of the response. | |
request ( string | Horde_Url $url, string $method, Horde_Http_Client $client, array $params = null ) : mixed | Builds an JSON-RPC request and sends it to the server. |
public _objectsToArrays ( $data ) : mixed | ||
$data | mixed Any stdClass object, array, or scalar. | |
return | mixed | stdClass objects are returned as asscociative arrays, scalars as-is, and arrays with their elements converted. |
public _raiseError ( string | PEAR_Error $error, stdClass $request ) : PEAR_Error | ||
$error | string | PEAR_Error | The error message or object. |
$request | stdClass | The original request object. |
return | PEAR_Error | An error object suitable for a JSON-RPC 1.1 conform error result. |
public getResponse ( $request ) : string | ||
return | string | The JSON encoded response from the server. |
public getResponseContentType ( ) : string | ||
return | string | The MIME Content-Type of the RPC response. |
public static request ( string | Horde_Url $url, string $method, Horde_Http_Client $client, array $params = null ) : mixed | ||
$url | string | Horde_Url | The path to the JSON-RPC server on the called host. |
$method | string | The method to call. |
$client | Horde_Http_Client | |
$params | array | A hash containing any necessary parameters for the method call. |
return | mixed | The returned result from the method. |