public static function getCurrentRoute()
    {
        if (!static::$currentRoute) {
            $uri = Grav::instance()['uri'];
            static::$currentRoute = RouteFactory::createFromParts($uri->toArray());
        }

        return static::$currentRoute;
    }
public static function getCurrentRoute()
    {
        if (!static::$currentRoute) {
            $uri = Grav::instance()['uri'];
            static::$currentRoute = RouteFactory::createFromParts($uri->toArray());
        }

        return static::$currentRoute;
    }
public static function getCurrentRoute ( ) { if ( ! static :: $ currentRoute ) { $ uri = Grav :: instance ( ) [ 'uri' ] ; static :: $ currentRoute = RouteFactory :: createFromParts ( $ uri -> toArray ( ) ) ; } return static :: $ currentRoute ; }
Returns current route.

@return \Grav\Framework\Route\Route
Returns current route .