Example #1
0
 /**
  * Adds a route to the route array
  * @param \ReRouter\Route $route
  * @param string $key
  */
 protected function addRoute(\ReRouter\Interfaces\Route $route, $key = null)
 {
     $route->setPattern($this->expandPatternAlias($route->getPattern()));
     if (!is_int($key)) {
         $route->overrideUid($key);
         $this->routes[$key] = $route;
         return $this;
     }
     $this->routes[$route->uid] = $route;
     return $this;
 }