Zend\Json\Server\Client
Synopsis
class Client
implements
Client
{
- // members
- protected string $serverAddress;
- protected Client $httpClient;
- protected Request $lastRequest;
- protected Response $lastResponse;
- protected integer $id;
- // methods
- public void __construct()
- public Client setHttpClient()
- public Client getHttpClient()
- public Request getLastRequest()
- public Response getLastResponse()
- public Response doRequest()
- public mixed call()
- protected Request createRequest()
Hierarchy
Implements
Members
protected
- $httpClient
—
Zend\Http\Client
HTTP Client to use for requests. - $id
—
int
Request ID counter. - $lastRequest
—
Zend\Json\Server\Request
Request of the last method call. - $lastResponse
—
Zend\Json\Server\Response
Response received from the last method call. - $serverAddress
—
string
Full address of the JSON-RPC service.
Methods
protected
- createRequest() — Create request object.
public
- __construct() — Create a new JSON-RPC client to a remote server.
- call() — Send a JSON-RPC request to the service (for a specific method).
- doRequest() — Perform a JSON-RPC request and return a response.
- getHttpClient() — Gets the HTTP client object.
- getLastRequest() — The request of the last method call.
- getLastResponse() — The response received from the last method call.
- setHttpClient() — Sets the HTTP client object to use for connecting the JSON-RPC server.