Documentation

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
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
6.0.0

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
throws
InvalidArgumentException

if any element is not a MiddlewareInterface

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

Return values
ResponseInterface

        
On this page

Search results