src/Yggdrasil/Core/Routing/Router.php
public function getRoute(Request $request): Route
    {
        if ($this->configuration->isRestRouting()) {
            $route = RestRouter::getInstance($this->configuration, $request)->resolveRoute();

            if ($route instanceof Route) {
                return $route;
            }
        }

        $query = $request->query->get('route');
        $this->routeParams = explode('/', trim($query, '/'));

        $route = (new Route())
            ->setController($this->resolveController())
            ->setAction($this->resolveAction())
            ->setActionParams($this->resolveActionParams());

        return $route;
    }
public function getRoute(Request $request): Route
    {
        if ($this->configuration->isRestRouting()) {
            $route = RestRouter::getInstance($this->configuration, $request)->resolveRoute();

            if ($route instanceof Route) {
                return $route;
            }
        }

        $query = $request->query->get('route');
        $this->routeParams = explode('/', trim($query, '/'));

        $route = (new Route())
            ->setController($this->resolveController())
            ->setAction($this->resolveAction())
            ->setActionParams($this->resolveActionParams());

        return $route;
    }
public function getRoute ( Request $ request ) : Route { if ( $ this -> configuration -> isRestRouting ( ) ) { $ route = RestRouter :: getInstance ( $ this -> configuration , $ request ) -> resolveRoute ( ) ; if ( $ route instanceof Route ) { return $ route ; } } $ query = $ request -> query -> get ( 'route' ) ; $ this -> routeParams = explode ( '/' , trim ( $ query , '/' ) ) ; $ route = ( new Route ( ) ) -> setController ( $ this -> resolveController ( ) ) -> setAction ( $ this -> resolveAction ( ) ) -> setActionParams ( $ this -> resolveActionParams ( ) ) ; return $ route ; }
Returns route for requested action

@param Request $request
@return Route
Returns route for requested action