src/Yggdrasil/Core/Routing/RestRouter.php
public function resolveRoute(): ?Route
    {
        $query = strtolower(rtrim($this->request->query->get('route'), '/'));

        switch(true) {
            case preg_match(self::WITH_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForWithIdentifierPattern($matches);

                break;
            case preg_match(self::NO_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForNoIdentifierPattern($matches);

                break;
            default:
                return null;
        }

        return $route;
    }
public function resolveRoute(): ?Route
    {
        $query = strtolower(rtrim($this->request->query->get('route'), '/'));

        switch(true) {
            case preg_match(self::WITH_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForWithIdentifierPattern($matches);

                break;
            case preg_match(self::NO_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForNoIdentifierPattern($matches);

                break;
            default:
                return null;
        }

        return $route;
    }
public function resolveRoute ( ) : ? Route { $ query = strtolower ( rtrim ( $ this -> request -> query -> get ( 'route' ) , '/' ) ) ; switch ( true ) { case preg_match ( self :: WITH_IDENTIFIER_PATTERN , $ query , $ matches ) : $ route = $ this -> detectRouteForWithIdentifierPattern ( $ matches ) ; break ; case preg_match ( self :: NO_IDENTIFIER_PATTERN , $ query , $ matches ) : $ route = $ this -> detectRouteForNoIdentifierPattern ( $ matches ) ; break ; default : return null ; } return $ route ; }
Resolves route for requested action

@return Route? If route cannot be resolved, NULL is returned
Resolves route for requested action