Message
in package
implements
Stringable
uses
StringableTrait
AbstractYes
WebSocket\Message\Message class.
Abstract superclass for WebSocket messages.
Table of Contents
Interfaces
Properties
- $content : string
- $opcode : string
- $timestamp : DateTimeInterface
Methods
- __construct() : mixed
- __toString() : string
- getContent() : string
- getFrames() : array<string|int, mixed>
- getLength() : int
- getOpcode() : string
- getPayload() : string
- getTimestamp() : DateTimeInterface
- hasContent() : bool
- setContent() : void
- setPayload() : void
- stringable() : string
Properties
$content
protected
string
$content
$opcode
protected
string
$opcode
$timestamp
protected
DateTimeInterface
$timestamp
Methods
__construct()
public
__construct([string $content = '' ]) : mixed
Parameters
- $content : string = ''
__toString()
public
__toString() : string
Return values
stringgetContent()
public
getContent() : string
Return values
stringgetFrames()
public
getFrames([int $frameSize = 4096 ]) : array<string|int, mixed>
Parameters
- $frameSize : int = 4096
Return values
array<string|int, mixed>getLength()
public
getLength() : int
Return values
intgetOpcode()
public
getOpcode() : string
Return values
stringgetPayload()
public
getPayload() : string
Return values
stringgetTimestamp()
public
getTimestamp() : DateTimeInterface
Return values
DateTimeInterfacehasContent()
public
hasContent() : bool
Return values
boolsetContent()
public
setContent([string $content = '' ]) : void
Parameters
- $content : string = ''
setPayload()
public
setPayload([string $payload = '' ]) : void
Parameters
- $payload : string = ''
stringable()
protected
stringable(string $format, mixed ...$values) : string
Parameters
- $format : string
- $values : mixed