class RouteCollection

A RouteCollection represents a set of Route instances as a tree structure.

When adding a route, it overrides existing routes with the same name defined in the instance or its children and parents.

@author Fabien Potencier <fabien@symfony.com> @author Tobias Schultze <http://tobion.de>

@api

Hierarchy

  • class \Symfony\Component\Routing\RouteCollection implements \Symfony\Component\Routing\IteratorAggregate, \Symfony\Component\Routing\Countable

Expanded class hierarchy of RouteCollection

43 files declare their use of RouteCollection

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php, line 27

Namespace

Symfony\Component\Routing
View source

Members

Namesort descending Modifiers Type Description Overrides
RouteCollection::$parent private property
RouteCollection::$prefix private property
RouteCollection::$resources private property
RouteCollection::$routes private property
RouteCollection::add public function Adds a route.
RouteCollection::addCollection public function Adds a route collection to the current set of routes (at the end of the current set).
RouteCollection::addPrefix public function Adds a prefix to all routes in the current set.
RouteCollection::addResource public function Adds a resource for this collection.
RouteCollection::all public function Returns all routes in this collection and its children.
RouteCollection::count public function Gets the number of Routes in this collection.
RouteCollection::get public function Gets a route by name defined in this collection or its children.
RouteCollection::getIterator public function Gets the current RouteCollection as an Iterator that includes all routes and child route collections.
RouteCollection::getParent public function Gets the parent RouteCollection.
RouteCollection::getPrefix public function Returns the prefix that may contain placeholders.
RouteCollection::getResources public function Returns an array of resources loaded to build this collection.
RouteCollection::getRoot public function Gets the root RouteCollection of the tree.
RouteCollection::hasCollection private function Checks whether the given RouteCollection is already set in any child of the current instance.
RouteCollection::remove public function Removes a route or an array of routes by name from all connected collections (this instance and all parents and children).
RouteCollection::removeRecursively private function Removes a route by name from this collection and its children recursively.
RouteCollection::setParent private function Sets the parent RouteCollection. It's only used internally from one RouteCollection to another. It makes no sense to be available as part of the public API.
RouteCollection::__clone public function
RouteCollection::__construct public function Constructor.