A batch request

Class Methods

The following methods can be invoked on instances of this class.

__construct(array batch)

Constructs a new JSON-RPC batch request
All values of type other than Tivoka\Client\Request will be ignored

getRequest(int spec)

Get the raw, JSON-encoded request

interpretResponse(array json_struct)

Interprets the parsed response

setHeaders(array raw_headers)

Save and parse the HTTP headers

sendTo(mixed target)

Send this request to a remote server directly

http_parse_headers(array headers)

Parses headers as returned by magic variable $http_response_header

setResponse(string response)

Interprets the response

isError()

Determines whether an error occured

interpretResult(mixed spec, mixed assoc, mixed id)

Checks whether the given response is a valid result

interpretError(mixed spec, mixed assoc, mixed id)

Checks whether the given response is valid and an error

prepareRequest(mixed spec, mixed id, mixed method, array params)

Encodes the request properties

uuid()