Example #1
0
 /**
  * Adds a new route context to the routing table.
  *
  * @param Route $route
  *
  * @throws RouteIdentifierException
  */
 public function add(Route $route)
 {
     $identifier = $route->identifier();
     if (isset($this->routes[$identifier])) {
         throw new RouteIdentifierException("Cannot redeclare route identified by: {$identifier}");
     }
     $this->routes[$identifier] = $route;
 }