Pdu

Protocol Data Unit (PDU).

package

Default

Methods

Creates PDU instance.

__construct(string $action, array $body, string|integer $id = null) 

Arguments

$action

string

Specifies the purpose of a PDU and determines the content of the body

$body

array

Content is specific to the PDU's action

$id

string|integer

Instructs RTM to send a response and enables a client to match a response to a request

Represents PDU as a json string when using in printing functions.

__toString() : string
magic

Response

string

Represents PDU as a string.

stringify() : string

Response

string

Represents PDU struct as an associative array.

struct() : array

Response

array