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

PathDispatchHandler
in package
implements RequestHandlerInterface

FinalYes

Terminal of an App::when() path-scoped middleware onion. Once every path-scoped middleware has called its $next, this hands control to the router's matchAndDispatch() — route matching + dispatch (including any per-route middleware: and, for /api/*, ZealAPI's in-file $middleware).

Stateless: only the HTTP method is baked in at construction; the rest of the match+dispatch reads coroutine-local request state from $g.

Table of Contents

Interfaces

RequestHandlerInterface

Properties

$dispatcher  : ResponseMiddleware
$method  : string

Methods

__construct()  : mixed
handle()  : ResponseInterface

Properties

Methods

handle()

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