interface FrameInterface implements Stringable

Methods

int
getOpcode()

Get the opcode.

setOpcode(int $opcode)

Set the opcode.

withOpcode(int $opcode)

Return a copy with the given opcode.

bool
getFin()

Determine whether this is the final frame.

setFin(bool $fin)

Set whether this is the final frame.

withFin(bool $fin)

Return a copy with the given final-frame state.

bool
getRSV1()

Get the first reserved bit.

setRSV1(bool $rsv1)

Set the first reserved bit.

withRSV1(bool $rsv1)

Return a copy with the given first reserved bit.

bool
getRSV2()

Get the second reserved bit.

setRSV2(bool $rsv2)

Set the second reserved bit.

withRSV2(bool $rsv2)

Return a copy with the given second reserved bit.

bool
getRSV3()

Get the third reserved bit.

setRSV3(bool $rsv3)

Set the third reserved bit.

withRSV3(bool $rsv3)

Return a copy with the given third reserved bit.

int
getPayloadLength()

Get the payload length.

bool
getMask()

Determine whether the frame is masked.

setMask(bool $mask)

Set whether the frame is masked.

withMask(bool $mask)

Return a copy with the given mask state.

StreamInterface
getPayloadData()

Get the payload data.

setPayloadData(mixed $payloadData)

Set the payload data.

withPayloadData(mixed $payloadData)

Return a copy with the given payload data.

string
toString()

Convert the frame to a string.

static FrameInterface
from(mixed $frame)

Create a frame from the given value.

Details

at line 15
int getOpcode()

Get the opcode.

Return Value

int

at line 20
FrameInterface setOpcode(int $opcode)

Set the opcode.

Parameters

int $opcode

Return Value

FrameInterface

at line 25
FrameInterface withOpcode(int $opcode)

Return a copy with the given opcode.

Parameters

int $opcode

Return Value

FrameInterface

at line 30
bool getFin()

Determine whether this is the final frame.

Return Value

bool

at line 35
FrameInterface setFin(bool $fin)

Set whether this is the final frame.

Parameters

bool $fin

Return Value

FrameInterface

at line 40
FrameInterface withFin(bool $fin)

Return a copy with the given final-frame state.

Parameters

bool $fin

Return Value

FrameInterface

at line 45
bool getRSV1()

Get the first reserved bit.

Return Value

bool

at line 50
FrameInterface setRSV1(bool $rsv1)

Set the first reserved bit.

Parameters

bool $rsv1

Return Value

FrameInterface

at line 55
FrameInterface withRSV1(bool $rsv1)

Return a copy with the given first reserved bit.

Parameters

bool $rsv1

Return Value

FrameInterface

at line 60
bool getRSV2()

Get the second reserved bit.

Return Value

bool

at line 65
FrameInterface setRSV2(bool $rsv2)

Set the second reserved bit.

Parameters

bool $rsv2

Return Value

FrameInterface

at line 70
FrameInterface withRSV2(bool $rsv2)

Return a copy with the given second reserved bit.

Parameters

bool $rsv2

Return Value

FrameInterface

at line 75
bool getRSV3()

Get the third reserved bit.

Return Value

bool

at line 80
FrameInterface setRSV3(bool $rsv3)

Set the third reserved bit.

Parameters

bool $rsv3

Return Value

FrameInterface

at line 85
FrameInterface withRSV3(bool $rsv3)

Return a copy with the given third reserved bit.

Parameters

bool $rsv3

Return Value

FrameInterface

at line 90
int getPayloadLength()

Get the payload length.

Return Value

int

at line 95
bool getMask()

Determine whether the frame is masked.

Return Value

bool

at line 100
FrameInterface setMask(bool $mask)

Set whether the frame is masked.

Parameters

bool $mask

Return Value

FrameInterface

at line 105
FrameInterface withMask(bool $mask)

Return a copy with the given mask state.

Parameters

bool $mask

Return Value

FrameInterface

at line 110
StreamInterface getPayloadData()

Get the payload data.

Return Value

StreamInterface

at line 115
FrameInterface setPayloadData(mixed $payloadData)

Set the payload data.

Parameters

mixed $payloadData

Return Value

FrameInterface

at line 120
FrameInterface withPayloadData(mixed $payloadData)

Return a copy with the given payload data.

Parameters

mixed $payloadData

Return Value

FrameInterface

at line 125
string toString()

Convert the frame to a string.

Return Value

string

at line 130
static FrameInterface from(mixed $frame)

Create a frame from the given value.

Parameters

mixed $frame

Return Value

FrameInterface