Payload
in package
implements
JsonSerializable
Represents a Gateway event payload.
Gateway event payloads have a common structure, but the contents of the associated data (d) varies between the different events.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $d : mixed|null
- $d : mixed|null
- $op : int
- $op : int
- $s : int|null
- $s : int|null
- $t : string|null
- $t : string|null
Methods
- __construct() : mixed
- __debugInfo() : mixed
- jsonSerialize() : array<string|int, mixed>
- new() : self
Properties
$d
public
mixed|null
$d
Event data.
$d
public
mixed|null
$d
$op
public
int
$op
Gateway opcode, which indicates the payload type.
$op
public
int
$op
$s
public
int|null
$s
Sequence number of event used for resuming sessions and heartbeating.
$s
public
int|null
$s
$t
public
string|null
$t
Event name.
$t
public
string|null
$t
Methods
__construct()
public
__construct(int $op[, mixed $d = null ][, int|null $s = null ][, string|null $t = null ]) : mixed
Parameters
- $op : int
- $d : mixed = null
- $s : int|null = null
- $t : string|null = null
__debugInfo()
public
__debugInfo() : mixed
jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>new()
public
static new(int $op[, mixed $d = null ][, int|null $s = null ][, string|null $t = null ]) : self
Parameters
- $op : int
- $d : mixed = null
- $s : int|null = null
- $t : string|null = null