Property | Type | Description | |
---|---|---|---|
$options | array | Parameters for creating RPC requests. | |
$timeout | integer | Time limit for communication with RPC server (seconds). | |
$url | string | Server address. |
Method | Description | |
---|---|---|
__construct ( string $url = '' ) | Creates client instance and eventually sets server address. | |
disableProfiler ( ) : self | Turns request profiler off. | |
enableProfiler ( ) : self | Turns request profiler on. | |
getCurlOption ( string $key = '' ) : mixed | Returns certain curl_setopt parameter or whole array of parameters if no parameter name is provided. | |
getOption ( string $key = '' ) : mixed | Returns certain parameter or whole array of parameters if no parameter name is provided. | |
send ( string $method, array $params ) : mixed | Sends a request and fetches a response from the server. | |
setCurlOption ( string $key, mixed $value ) : self | Changes curl_setopt settings. | |
setOption ( string $key, mixed $value ) : self | Changes client settings. | |
setTimeout ( integer $timeout ) : self | Sets timeout. | |
setUrl ( string $url ) : self | Sets server address. |
Method | Description | |
---|---|---|
process ( string $contentType, string $data ) : string | Processes request data and fetches response. | |
profileEnd ( string $type, string $method, array $params, mixed $response ) : self | Finishes profiling. | |
profileStart ( ) : self | Starts profiling. |
public __construct ( string $url = '' ) | ||
$url | string | Server address |
public disableProfiler ( ) : self | ||
return | self |
public enableProfiler ( ) : self | ||
return | self |
public getCurlOption ( string $key = '' ) : mixed | ||
$key | string | Parameter name |
return | mixed |
public setCurlOption ( string $key, mixed $value ) : self | ||
$key | string | Parameter name |
$value | mixed | Parameter value |
return | self |
public setTimeout ( integer $timeout ) : self | ||
$timeout | integer | Call timeout |
return | self |
protected array $options | ||
return | array |
protected int $timeout | ||
return | integer |