ApiRouter
in package
Table of Contents
- $dispatcher : Dispatcher
- __construct() : mixed
- dispatch() : ResponseInterface
- resolveHandler() : callable
- Resolve a route handler into a PHP callable.
Properties
$dispatcher
private
Dispatcher
$dispatcher
Methods
__construct()
public
__construct(array<string|int, mixed> $routes) : mixed
Parameters
- $routes : array<string|int, mixed>
Return values
mixed —dispatch()
public
dispatch(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterface —resolveHandler()
Resolve a route handler into a PHP callable.
private
resolveHandler(callable|array<string|int, string> $handler) : callable
Parameters
- $handler : callable|array<string|int, string>