Close
extends Message
in package
WebSocket\Message\Close class.
A Close WebSocket message.
Table of Contents
Properties
- $content : string
- $opcode : string
- $status : int|null
- $timestamp : DateTimeInterface
Methods
- __construct() : mixed
- __toString() : string
- getCloseStatus() : int|null
- getContent() : string
- getFrames() : array<string|int, mixed>
- getLength() : int
- getOpcode() : string
- getPayload() : string
- getTimestamp() : DateTimeInterface
- hasContent() : bool
- setCloseStatus() : void
- setContent() : void
- setPayload() : void
- stringable() : string
Properties
$content
protected
string
$content
$opcode
protected
string
$opcode
= 'close'
$status
protected
int|null
$status
= null
$timestamp
protected
DateTimeInterface
$timestamp
Methods
__construct()
public
__construct([int|null $status = null ][, string $content = '' ]) : mixed
Parameters
- $status : int|null = null
- $content : string = ''
__toString()
public
__toString() : string
Return values
stringgetCloseStatus()
public
getCloseStatus() : int|null
Return values
int|nullgetContent()
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
boolsetCloseStatus()
public
setCloseStatus(int|null $status) : void
Parameters
- $status : int|null
setContent()
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