Response implements MessageInterface
Tags
Table of Contents
Interfaces
- MessageInterface
- Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
Properties
Methods
- __construct() : mixed
-
fromArray()
: self
> - getId() : string|int
- jsonSerialize() : array{jsonrpc: string, id: string|int, result: mixed}
Properties
$id read-only
public
string|int
$id
$result read-only
public
TResult
$result
Methods
__construct()
public
__construct(string|int $id, TResult $result) : mixed
Parameters
- $id : string|int
-
this MUST be the same as the value of the id member in the Request Object
- $result : TResult
-
the value of this member is determined by the method invoked on the Server
fromArray()
public
static fromArray(ResponseData $data) : self>
Parameters
- $data : ResponseData
Return values
selfgetId()
public
getId() : string|int
Return values
string|intjsonSerialize()
public
jsonSerialize() : array{jsonrpc: string, id: string|int, result: mixed}