protected function RouteCollectionTest::getFirstNamedRoute

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php, line 91

Class

RouteCollectionTest

Namespace

Symfony\Component\Routing\Tests

Code

protected function getFirstNamedRoute(RouteCollection $routeCollection, $name) {
  foreach ($routeCollection as $key => $route) {
    if ($route instanceof RouteCollection) {
      return $this
        ->getFirstNamedRoute($route, $name);
    }
    if ($name === $key) {
      return $route;
    }
  }
}