You are here

public function RouteCollection::add in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/RouteCollection.php \Symfony\Component\Routing\RouteCollection::add()

Adds a route.

Parameters

string $name The route name:

Route $route A Route instance:

1 method overrides RouteCollection::add()
ChainRouteCollection::add in vendor/symfony-cmf/routing/ChainRouteCollection.php
Adds a route.

File

vendor/symfony/routing/RouteCollection.php, line 75

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function add($name, Route $route) {
  unset($this->routes[$name]);
  $this->routes[$name] = $route;
}