Alpha ZealPHP is early-stage and under active development. APIs may change between minor versions until v1.0. Feedback and bug reports welcome on GitHub.
API Index — Namespaces, Packages, Reports, Indices

RouteDispatchHandler
in package
implements RequestHandlerInterface

FinalYes

Terminal of a per-route middleware onion. Once every route-level middleware (the middleware: option / a route group's chain) has called its $next, this hands control back to the router's dispatchMatched() with the matched route + params (baked in at construction, so the chain carries no shared per-request state and is safe under coroutine concurrency).

Table of Contents

Interfaces

RequestHandlerInterface

Properties

$dispatcher  : ResponseMiddleware
$method  : string
$params  : array<string|int, mixed>
$route  : array<string|int, mixed>

Methods

__construct()  : mixed
handle()  : ResponseInterface

Properties

Methods

__construct()

public __construct(ResponseMiddleware $dispatcher, array<string, mixed> $route, array<string, mixed> $params, string $method) : mixed
Parameters
$dispatcher : ResponseMiddleware
$route : array<string, mixed>
$params : array<string, mixed>
$method : string

handle()

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