private function DumperPrefixCollectionTest::collectionToString

2 calls to DumperPrefixCollectionTest::collectionToString()

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php, line 109

Class

DumperPrefixCollectionTest

Namespace

Symfony\Component\Routing\Tests\Matcher\Dumper

Code

private function collectionToString(DumperCollection $collection, $prefix) {
  $string = '';
  foreach ($collection as $route) {
    if ($route instanceof DumperCollection) {
      $string .= sprintf("%s|-coll %s\n", $prefix, $route
        ->getPrefix());
      $string .= $this
        ->collectionToString($route, $prefix . '| ');
    }
    else {
      $string .= sprintf("%s|-route %s %s\n", $prefix, $route
        ->getName(), $route
        ->getRoute()
        ->getPath());
    }
  }
  return $string;
}