Documentation

ClosureResponseRequestHandler
in package
implements RequestHandlerInterface

The closure request handler is basically a message, it contains a closure and a set of parameters to pass to the closure so it can be executed and the response retrieved from the result.

Please note that the return value of the closure is not checked, if it's not a ResponseInterface it will fail.

Interfaces, Classes and Traits

RequestHandlerInterface

Table of Contents

$params  : array<string|int, mixed>
$response  : ResponseInterface
__construct()  : mixed
handle()  : ResponseInterface

Properties

Methods

__construct()

public __construct(Closure $response, array<string|int, mixed> $params) : mixed
Parameters
$response : Closure
$params : array<string|int, mixed>
Return values
mixed

handle()

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

Search results