class RpcRequest (View source)

Methods

__construct()

No description

string
getUniqueId()

Get request's unique id

string|null
getMethod()

Get rpc method

setMethod(string $method)

Set rpc method

array
getParameters()

Get parameters

setParameters(array $params = [])

Set parameters

array
getSpecialTypes()

Get values marked as special type

setSpecialType(string $value, string $type)

Set values as special type

int|bool|null
getId()

Get request's id

setId(int|bool|null $id = null)

Set request's id

array
toArray()

Export request as an array

static RpcRequest
create(string $method, array $parameters = [], int|bool|null $id = true)

Static constructor

Details

__construct()

string getUniqueId()

Get request's unique id

Return Value

string

string|null getMethod()

Get rpc method

Return Value

string|null

RpcRequest setMethod(string $method)

Set rpc method

Parameters

string $method

Return Value

RpcRequest

Exceptions

InvalidArgumentException

array getParameters()

Get parameters

Return Value

array

RpcRequest setParameters(array $params = [])

Set parameters

Parameters

array $params

Return Value

RpcRequest

array getSpecialTypes()

Get values marked as special type

Return Value

array

RpcRequest setSpecialType(string $value, string $type)

Set values as special type

Parameters

string $value
string $type

Return Value

RpcRequest

Exceptions

InvalidArgumentException

int|bool|null getId()

Get request's id

Return Value

int|bool|null

RpcRequest setId(int|bool|null $id = null)

Set request's id

Parameters

int|bool|null $id

Return Value

RpcRequest

Exceptions

InvalidArgumentException

array toArray()

Export request as an array

Return Value

array

static RpcRequest create(string $method, array $parameters = [], int|bool|null $id = true)

Static constructor

Parameters

string $method
array $parameters
int|bool|null $id

Return Value

RpcRequest

Exceptions

Exception