Frame
class Frame implements FrameInterface
Properties
| protected StreamInterface | $payloadData |
Methods
No description
No description
Get the opcode.
Set the opcode.
Return a copy with the given opcode.
Determine whether this is the final frame.
Set whether this is the final frame.
Return a copy with the given final-frame state.
Get the first reserved bit.
Set the first reserved bit.
Return a copy with the given first reserved bit.
Get the second reserved bit.
Set the second reserved bit.
Return a copy with the given second reserved bit.
Get the third reserved bit.
Set the third reserved bit.
Return a copy with the given third reserved bit.
Get the payload length.
Determine whether the frame is masked.
Set whether the frame is masked.
Return a copy with the given mask state.
Get the payload data.
Set the payload data.
Return a copy with the given payload data.
Convert the frame to a string.
Create a frame from the given value.
Details
at line 19
__construct(bool $fin = true, bool $rsv1 = false, bool $rsv2 = false, bool $rsv3 = false, int $opcode = Opcode::TEXT, bool $mask = false, mixed $payloadData = '')
No description
at line 31
string
__toString()
No description
at line 36
int
getOpcode()
Get the opcode.
at line 41
FrameInterface
setOpcode(int $opcode)
Set the opcode.
at line 47
FrameInterface
withOpcode(int $opcode)
Return a copy with the given opcode.
at line 52
bool
getFin()
Determine whether this is the final frame.
at line 57
FrameInterface
setFin(bool $fin)
Set whether this is the final frame.
at line 63
FrameInterface
withFin(bool $fin)
Return a copy with the given final-frame state.
at line 68
bool
getRSV1()
Get the first reserved bit.
at line 73
FrameInterface
setRSV1(bool $rsv1)
Set the first reserved bit.
at line 79
FrameInterface
withRSV1(bool $rsv1)
Return a copy with the given first reserved bit.
at line 84
bool
getRSV2()
Get the second reserved bit.
at line 89
FrameInterface
setRSV2(bool $rsv2)
Set the second reserved bit.
at line 95
FrameInterface
withRSV2(bool $rsv2)
Return a copy with the given second reserved bit.
at line 100
bool
getRSV3()
Get the third reserved bit.
at line 105
FrameInterface
setRSV3(bool $rsv3)
Set the third reserved bit.
at line 111
FrameInterface
withRSV3(bool $rsv3)
Return a copy with the given third reserved bit.
at line 116
int
getPayloadLength()
Get the payload length.
at line 121
bool
getMask()
Determine whether the frame is masked.
at line 126
FrameInterface
setMask(bool $mask)
Set whether the frame is masked.
at line 132
FrameInterface
withMask(bool $mask)
Return a copy with the given mask state.
at line 137
StreamInterface
getPayloadData()
Get the payload data.
at line 142
FrameInterface
setPayloadData(mixed $payloadData)
Set the payload data.
at line 148
FrameInterface
withPayloadData(mixed $payloadData)
Return a copy with the given payload data.
at line 153
string
toString()
Convert the frame to a string.
at line 162
static FrameInterface
from(mixed $frame)
Create a frame from the given value.