src/Dispatcher.php
protected function setFoundMiddleware(Route $route) : void
    {
        if (is_null($route->getStrategy())) {
            $route->setStrategy($this->getStrategy());
        }

        // wrap entire dispatch process in exception handler
        $this->prependMiddleware($route->getStrategy()->getExceptionHandler());

        // add group and route specific middleware
        if ($group = $route->getParentGroup()) {
            $this->middlewares($group->getMiddlewareStack());
        }

        $this->middlewares($route->getMiddlewareStack());

        // add actual route to end of stack
        $this->middleware($route);
    }
protected function setFoundMiddleware(Route $route) : void
    {
        if (is_null($route->getStrategy())) {
            $route->setStrategy($this->getStrategy());
        }

        // wrap entire dispatch process in exception handler
        $this->prependMiddleware($route->getStrategy()->getExceptionHandler());

        // add group and route specific middleware
        if ($group = $route->getParentGroup()) {
            $this->middlewares($group->getMiddlewareStack());
        }

        $this->middlewares($route->getMiddlewareStack());

        // add actual route to end of stack
        $this->middleware($route);
    }
protected function setFoundMiddleware ( Route $ route ) : void { if ( is_null ( $ route -> getStrategy ( ) ) ) { $ route -> setStrategy ( $ this -> getStrategy ( ) ) ; } // wrap entire dispatch process in exception handler $ this -> prependMiddleware ( $ route -> getStrategy ( ) -> getExceptionHandler ( ) ) ; // add group and route specific middleware if ( $ group = $ route -> getParentGroup ( ) ) { $ this -> middlewares ( $ group -> getMiddlewareStack ( ) ) ; } $ this -> middlewares ( $ route -> getMiddlewareStack ( ) ) ; // add actual route to end of stack $ this -> middleware ( $ route ) ; }
Set up middleware for a found route

@param \League\Route\Route $route

@return void
Set up middleware for a found route