concrete/src/Http/Middleware/MiddlewareStack.php
private function getStack()
    {
        $processed = [];

        foreach ($this->middlewareGenerator() as $middleware) {
            $processed[] = $middleware;
        }

        $middleware = array_reverse($processed);
        $stack = array_reduce($middleware, $this->getZipper(), $this->dispatcher);

        return $stack;
    }
private function getStack()
    {
        $processed = [];

        foreach ($this->middlewareGenerator() as $middleware) {
            $processed[] = $middleware;
        }

        $middleware = array_reverse($processed);
        $stack = array_reduce($middleware, $this->getZipper(), $this->dispatcher);

        return $stack;
    }
private function getStack ( ) { $ processed = [ ] ; foreach ( $ this -> middlewareGenerator ( ) as $ middleware ) { $ processed [ ] = $ middleware ; } $ middleware = array_reverse ( $ processed ) ; $ stack = array_reduce ( $ middleware , $ this -> getZipper ( ) , $ this -> dispatcher ) ; return $ stack ; }
Reduce middleware into a stack of functions that each call the next
@return callable
Reduce middleware into a stack of functions that each call the next