$queue
$queue : array
The queue of middlewares.
Provides methods for creating and manipulating a "queue" of middleware callables.
This queue is used to process a request and response via \Cake\Http\Runner.
insertAt(integer $index, callable|string $middleware) : $this
Insert a middleware callable at a specific index.
If the index already exists, the new callable will be inserted, and the existing element will be shifted one index greater.
integer | $index | The index to insert at. |
callable|string | $middleware | The middleware to insert. |
insertBefore(string $class, callable|string $middleware) : $this
Insert a middleware object before the first matching class.
Finds the index of the first middleware that matches the provided class, and inserts the supplied callable before it.
string | $class | The classname to insert the middleware before. |
callable|string | $middleware | The middleware to insert. |
If middleware to insert before is not found.
insertAfter(string $class, callable|string $middleware) : $this
Insert a middleware object after the first matching class.
Finds the index of the first middleware that matches the provided class, and inserts the supplied callable after it. If the class is not found, this method will behave like add().
string | $class | The classname to insert the middleware before. |
callable|string | $middleware | The middleware to insert. |
Loading…