Pipeline
in package
Builds and runs a middleware chain. Registration order is wrap order: the first-registered middleware ends up outermost (runs first going in, last coming out) - the standard onion convention.
Tags
Table of Contents
Properties
- $middleware : array<string|int, mixed>
- Registered middleware, in registration order
Methods
- __construct() : mixed
- Constructor
- process() : ResponseInterface
- Build the chain (terminal innermost, first-registered middleware outermost) and run it against the given request
Properties
$middleware
Registered middleware, in registration order
protected
array<string|int, mixed>
$middleware
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $middleware = [] ]) : mixed
Parameters
- $middleware : array<string|int, mixed> = []
-
MiddlewareInterface instances, in registration order
Tags
process()
Build the chain (terminal innermost, first-registered middleware outermost) and run it against the given request
public
process(RequestInterface $request, callable $terminal) : ResponseInterface
Parameters
- $request : RequestInterface
- $terminal : callable
-
callable(RequestInterface $request): ResponseInterface