Documentation

RequestHandler implements RequestHandlerInterface uses RequestHandlerTrait

Class RequestHandler

Table of Contents

Interfaces

RequestHandlerInterface

Properties

$container  : ContainerInterface|null
$handler  : callable
$middleware  : array<int, string|MiddlewareInterface>

Methods

__construct()  : mixed
Delegate constructor.
addCallable()  : $this
Add callable initializing Middleware that will be executed as soon as possible.
addMiddleware()  : $this
Add Middleware that will be executed as soon as possible.
handle()  : ResponseInterface
{@inheritdoc}

Properties

Methods

__construct()

Delegate constructor.

public __construct(array<string|int, mixed> $middleware, callable $default[, ContainerInterface|null $container = null ]) : mixed
Parameters
$middleware : array<string|int, mixed>
$default : callable
$container : ContainerInterface|null = null

addCallable()

Add callable initializing Middleware that will be executed as soon as possible.

public addCallable(string $name, callable $callable) : $this
Parameters
$name : string
$callable : callable
Return values
$this

addMiddleware()

Add Middleware that will be executed as soon as possible.

public addMiddleware(string $name, MiddlewareInterface $middleware) : $this
Parameters
$name : string
$middleware : MiddlewareInterface
Return values
$this

handle()

{@inheritdoc}

public handle(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Tags
throws
InvalidArgumentException
Return values
ResponseInterface

        
On this page

Search results