src/Router.php
public function run(ServerRequestInterface $request, ResponseInterface $response, $next = null)
    {
        if (!$request->getAttribute('route') instanceof Route) {
            $route = $this->routes->getRoute($request);

            if (!$route) {
                return $this->notFound($request, $response);
            }

            $request = $request->withAttribute('route', $route);
        }
        
        $runner = $this->getRunner();

        return $runner($request, $response, $next);
    }
public function run(ServerRequestInterface $request, ResponseInterface $response, $next = null)
    {
        if (!$request->getAttribute('route') instanceof Route) {
            $route = $this->routes->getRoute($request);

            if (!$route) {
                return $this->notFound($request, $response);
            }

            $request = $request->withAttribute('route', $route);
        }
        
        $runner = $this->getRunner();

        return $runner($request, $response, $next);
    }
public function run ( ServerRequestInterface $ request , ResponseInterface $ response , $ next = null ) { if ( ! $ request -> getAttribute ( 'route' ) instanceof Route ) { $ route = $ this -> routes -> getRoute ( $ request ) ; if ( ! $ route ) { return $ this -> notFound ( $ request , $ response ) ; } $ request = $ request -> withAttribute ( 'route' , $ route ) ; } $ runner = $ this -> getRunner ( ) ; return $ runner ( $ request , $ response , $ next ) ; }
Run the action.
This method doesn't call the middlewares, but only run the action.

@param ServerRequestInterface $request
@param ResponseInterface      $response
@param callback      $next
@return ResponseInterface
Run the action . This method doesn t call the middlewares but only run the action .