Exemple #1
0
    }
    private static function createRouteAction($controller, $action)
    {
        return $controller . '#' . $action;
    }
    /**
     * @return RouteRule[]
     */
    public static function getRoutes()
    {
        return self::$routes;
    }
    public static function getRoutesForController($controller)
    {
        return Arrays::filter(self::getRoutes(), function (RouteRule $route) use($controller) {
            return Strings::equalsIgnoreCase($route->getController(), $controller);
        });
    }
    public static function group($name, $routeFunction)
    {
        GroupedRoute::setGroupName($name);
        $routeFunction();
    }
    public static function clear()
    {
        self::$routes = array();
        self::$routeKeys = array();
    }
}
Route::$isDebug = Config::getValue('debug');