Exemplo n.º 1
0
 /**
  * compile and add route to mapped array
  *
  * @param string $name name of the route
  * @param string $pattern pattern matching the route
  * @param array $defaults defaults parameters
  * @param array $requirements TODO write docs
  * @param array $options TODO write docs
  *
  * @return void
  */
 public static function map($name, $pattern, array $defaults, array $requirements = array(), array $options = array())
 {
     self::singleton();
     $route = new Zigra_Route($pattern, $defaults, $requirements, $options);
     $compiledRoute = $route->compile();
     self::$_routeCollection->add($name, $route);
     self::$_compiledRouteCollection->add($name, $compiledRoute);
 }