Example #1
0
 static function r($route, $controller, $method)
 {
     self::init();
     if (!self::$routeFound) {
         $route = preg_replace('#\\(\\:[a-z]+\\)#i', '([a-z0-9-_]+)', $route);
         if (preg_match('#^' . $route . '/?$#i', self::$uri, $ids)) {
             if (isset($ids)) {
                 self::$ids = array_slice($ids, 1);
             }
             self::$routeFound = true;
             $controller::$method();
         }
     }
 }