MiddlewareHandler
    
            
            in package
            
        
    
            
            implements
                            LoggerAwareInterface,                             Stringable                    
    
            
            uses
                            StringableTrait                    
    
WebSocket\Middleware\MiddlewareHandler class.
Middleware handling.
Table of Contents
Interfaces
- LoggerAwareInterface
- Describes a logger-aware instance.
- Stringable
Properties
- $httpHandler : HttpHandler
- $httpIncoming : array<string|int, mixed>
- $httpOutgoing : array<string|int, mixed>
- $incoming : array<string|int, mixed>
- $logger : LoggerInterface
- $messageHandler : MessageHandler
- $outgoing : array<string|int, mixed>
- $tick : array<string|int, mixed>
Methods
- __construct() : mixed
- Create MiddlewareHandler.
- __toString() : string
- add() : $this
- Add a middleware.
- processHttpIncoming() : Message
- Process middlewares for http requests.
- processHttpOutgoing() : Message
- Process middlewares for http requests.
- processIncoming() : Message
- Process middlewares for incoming messages.
- processOutgoing() : Message
- Process middlewares for outgoing messages.
- processTick() : void
- Process middlewares for tick.
- setLogger() : void
- Set logger on MiddlewareHandler and all LoggerAware middlewares.
- stringable() : string
Properties
$httpHandler
    private
        HttpHandler
    $httpHandler
    
    
    
    
$httpIncoming
    private
        array<string|int, mixed>
    $httpIncoming
     = []
    
    
    
$httpOutgoing
    private
        array<string|int, mixed>
    $httpOutgoing
     = []
    
    
    
$incoming
    private
        array<string|int, mixed>
    $incoming
     = []
    
    
    
$logger
    private
        LoggerInterface
    $logger
    
    
    
    
$messageHandler
    private
        MessageHandler
    $messageHandler
    
    
    
    
$outgoing
    private
        array<string|int, mixed>
    $outgoing
     = []
    
    
    
$tick
    private
        array<string|int, mixed>
    $tick
     = []
    
    
    
Methods
__construct()
Create MiddlewareHandler.
    public
                    __construct(MessageHandler $messageHandler, HttpHandler $httpHandler) : mixed
    Parameters
- $messageHandler : MessageHandler
- $httpHandler : HttpHandler
__toString()
    public
                    __toString() : string
    Return values
stringadd()
Add a middleware.
    public
                    add(MiddlewareInterface $middleware) : $this
    Parameters
- $middleware : MiddlewareInterface
Return values
$thisprocessHttpIncoming()
Process middlewares for http requests.
    public
                    processHttpIncoming(Connection $connection) : Message
    Parameters
- $connection : Connection
Return values
MessageprocessHttpOutgoing()
Process middlewares for http requests.
    public
                    processHttpOutgoing(Connection $connection, Message $message) : Message
    Parameters
- $connection : Connection
- $message : Message
Return values
MessageprocessIncoming()
Process middlewares for incoming messages.
    public
                    processIncoming(Connection $connection) : Message
    Parameters
- $connection : Connection
Return values
MessageprocessOutgoing()
Process middlewares for outgoing messages.
    public
                    processOutgoing(Connection $connection, Message $message) : Message
    Parameters
- $connection : Connection
- $message : Message
Return values
MessageprocessTick()
Process middlewares for tick.
    public
                    processTick(Connection $connection) : void
    Parameters
- $connection : Connection
setLogger()
Set logger on MiddlewareHandler and all LoggerAware middlewares.
    public
                    setLogger(LoggerInterface $logger) : void
    Parameters
- $logger : LoggerInterface
stringable()
    protected
                    stringable(string $format, mixed ...$values) : string
    Parameters
- $format : string
- $values : mixed