55 if ($this->middlewareLock) {
56 throw new RuntimeException(
'Middleware can’t be added once the stack is dequeuing');
59 if (is_null($this->tip)) {
63 $this->tip =
function (
73 'Middleware must return instance of \Psr\Http\Message\ResponseInterface' 92 if (!is_null($this->tip)) {
95 if ($kernel === null) {
111 if (is_null($this->tip)) {
116 $this->middlewareLock =
true;
117 $response =
$start($request, $response);
118 $this->middlewareLock =
false;
Representation of an incoming, server-side HTTP request.
foreach($paths as $path) $request
addMiddleware(callable $callable)
Add middleware.
Representation of an outgoing, server-side response.
Slim Framework (https://slimframework.com)
seedMiddlewareStack(callable $kernel=null)
Seed middleware stack with first callable.