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

Pipeline

Table of Contents

Classes

ApiDispatchHandler
Terminal of a ZealAPI file's in-file $middleware onion. Once every in-file middleware has called its $next, this invokes the resolved api handler closure (ZealAPI::runHandlerWithContract) and turns the universal-return contract result into a PSR-7 ResponseInterface for the onion:
MiddlewareFrame
One frame of a middleware onion: pairs a PSR-15 middleware with the RequestHandler it wraps, so a chain can be assembled as nested handlers (new MiddlewareFrame($m0, new MiddlewareFrame($m1, $terminal))). Calling handle() runs the middleware's process(), handing it the inner handler as $next. Stateless and cheap — a couple of object fields, no clone-per-step.
PathDispatchHandler
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).
RouteDispatchHandler
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).
On this page