MiddlewarePipeline
final class MiddlewarePipeline implements RequestHandlerInterface (View source)
Executes an ordered PSR-15 middleware chain before a terminal request handler.
Methods
__construct(array $stack, RequestHandlerInterface $fallback, int $index = 0)
Creates one immutable cursor within the shared middleware sequence.
create(array $stack, RequestHandlerInterface $fallback)
Normalizes a middleware sequence and returns its initial execution cursor.
handle(ServerRequestInterface $request)
Invokes the current middleware or the terminal handler after the sequence is exhausted.
ResponseInterface
Details
__construct
__construct(array $stack, RequestHandlerInterface $fallback, int $index = 0)
Creates one immutable cursor within the shared middleware sequence.
create
static MiddlewarePipeline
create(array $stack, RequestHandlerInterface $fallback)
Normalizes a middleware sequence and returns its initial execution cursor.
handle
ResponseInterface
handle(ServerRequestInterface $request)
Invokes the current middleware or the terminal handler after the sequence is exhausted.