public function DumperCollection::add

Adds a route or collection

Parameters

DumperRoute|DumperCollection The route or collection:

1 call to DumperCollection::add()
DumperPrefixCollection::addPrefixRoute in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php
Adds a route in the tree.

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php, line 51

Class

DumperCollection
Collection of routes.

Namespace

Symfony\Component\Routing\Matcher\Dumper

Code

public function add($child) {
  if ($child instanceof DumperCollection) {
    $child
      ->setParent($this);
  }
  $this->children[] = $child;
}