You are here

public function ChainRouteCollection::get in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/ChainRouteCollection.php \Symfony\Cmf\Component\Routing\ChainRouteCollection::get()

Gets a route by name.

Parameters

string $name The route name:

Return value

Route|null A Route instance or null when not found

Overrides RouteCollection::get

File

vendor/symfony-cmf/routing/ChainRouteCollection.php, line 100

Class

ChainRouteCollection

Namespace

Symfony\Cmf\Component\Routing

Code

public function get($name) {
  foreach ($this->routeCollections as $routeCollection) {
    $route = $routeCollection
      ->get($name);
    if (null !== $route) {
      return $route;
    }
  }
  return null;
}