class Json implements WSEncodingInterface (View source)

Handles WS encoding.

Methods

string
getName()

Returns encoding name (for gateway query string).

static void
supported()

Checks if the system supports it.

mixed
decode(string $data)

Decodes data.

string
encode(mixed $data)

Encodes data.

Message
prepareMessage(string $data)

Prepares the data to be sent.

Details

string getName()

Returns encoding name (for gateway query string).

Return Value

string

static void supported()

Checks if the system supports it.

Return Value

void

Exceptions

RuntimeException

mixed decode(string $data)

Decodes data.

Parameters

string $data

Return Value

mixed

Exceptions

DiscordGatewayException

string encode(mixed $data)

Encodes data.

Parameters

mixed $data

Return Value

string

Exceptions

DiscordGatewayException

Message prepareMessage(string $data)

Prepares the data to be sent.

Parameters

string $data

Return Value

Message