RouterInterface
Matches a PSR-7 request against the route table. A pure function of the request: it never throws for a miss and never constructs a response — a 404 or 405 is the expected {@see RouteResult}, not an exception. How routes are registered (attribute scanning, config, code) is deliberately an implementation concern, kept out of this contract.
RouterInterface::match()
abstract public function match(Psr\Http\Message\ServerRequestInterface $request): Milpa\Http\Routing\RouteResultResolve the request to a typed result — always MATCHED, NOT_FOUND or METHOD_NOT_ALLOWED, never null.
Parameters
| Name | Type | Description |
|---|---|---|
| $request | Psr\Http\Message\ServerRequestInterface |