Callback
in package
implements
LoggerAwareInterface, ProcessHttpIncomingInterface, ProcessHttpOutgoingInterface, ProcessIncomingInterface, ProcessOutgoingInterface, ProcessTickInterface, Stringable
uses
LoggerAwareTrait, StringableTrait
WebSocket\Middleware\Callback class.
Generic middleware using callbacks.
Table of Contents
Interfaces
- LoggerAwareInterface
- Describes a logger-aware instance.
- ProcessHttpIncomingInterface
- WebSocket\Middleware\ProcessHttpIncomingInterface interface.
- ProcessHttpOutgoingInterface
- WebSocket\Middleware\ProcessHttpOutgoingInterface interface.
- ProcessIncomingInterface
- WebSocket\Middleware\ProcessIncomingInterface interface.
- ProcessOutgoingInterface
- WebSocket\Middleware\ProcessOutgoingInterface interface.
- ProcessTickInterface
- WebSocket\Middleware\ProcessTickInterface interface.
- Stringable
Properties
- $logger : LoggerInterface|null
- The logger instance.
- $httpIncoming : Closure|null
- $httpOutgoing : Closure|null
- $incoming : Closure|null
- $outgoing : Closure|null
- $tick : Closure|null
Methods
- __construct() : mixed
- __toString() : string
- processHttpIncoming() : Message
- processHttpOutgoing() : Message
- processIncoming() : Message
- processOutgoing() : Message
- processTick() : void
- setLogger() : void
- Sets a logger.
- stringable() : string
Properties
$logger
The logger instance.
protected
LoggerInterface|null
$logger
= null
$httpIncoming
private
Closure|null
$httpIncoming
$httpOutgoing
private
Closure|null
$httpOutgoing
$incoming
private
Closure|null
$incoming
$outgoing
private
Closure|null
$outgoing
$tick
private
Closure|null
$tick
Methods
__construct()
public
__construct([Closure|null $incoming = null ][, Closure|null $outgoing = null ][, Closure|null $httpIncoming = null ][, Closure|null $httpOutgoing = null ][, Closure|null $tick = null ]) : mixed
Parameters
- $incoming : Closure|null = null
- $outgoing : Closure|null = null
- $httpIncoming : Closure|null = null
- $httpOutgoing : Closure|null = null
- $tick : Closure|null = null
__toString()
public
__toString() : string
Return values
stringprocessHttpIncoming()
public
processHttpIncoming(ProcessHttpStack $stack, Connection $connection) : Message
Parameters
- $stack : ProcessHttpStack
- $connection : Connection
Return values
MessageprocessHttpOutgoing()
public
processHttpOutgoing(ProcessHttpStack $stack, Connection $connection, Message $message) : Message
Parameters
- $stack : ProcessHttpStack
- $connection : Connection
- $message : Message
Return values
MessageprocessIncoming()
public
processIncoming(ProcessStack $stack, Connection $connection) : Message
Parameters
- $stack : ProcessStack
- $connection : Connection
Return values
MessageprocessOutgoing()
public
processOutgoing(ProcessStack $stack, Connection $connection, Message $message) : Message
Parameters
- $stack : ProcessStack
- $connection : Connection
- $message : Message
Return values
MessageprocessTick()
public
processTick(ProcessTickStack $stack, Connection $connection) : void
Parameters
- $stack : ProcessTickStack
- $connection : Connection
setLogger()
Sets a logger.
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
stringable()
protected
stringable(string $format, mixed ...$values) : string
Parameters
- $format : string
- $values : mixed