DumperCollection
class DumperCollection implements IteratorAggregate
Collection of routes.
Methods
| DumperCollection[]|DumperRoute[] | all() Returns the children routes and collections. | |
| add(DumperRoute|DumperCollection $child) Adds a route or collection. | ||
| setAll(array $children) Sets children. | ||
| Iterator|DumperCollection[]|DumperRoute[] | getIterator() Returns an iterator over the children. | |
| DumperCollection | getRoot() Returns the root of the collection. | |
| bool | hasAttribute(string $name) Returns true if the attribute is defined. | |
| mixed | getAttribute(string $name, mixed $default = null) Returns an attribute by name. | |
| setAttribute(string $name, mixed $value) Sets an attribute by name. | ||
| setAttributes(array $attributes) Sets multiple attributes. |
Details
DumperCollection[]|DumperRoute[] all()
Returns the children routes and collections.
Return Value
| DumperCollection[]|DumperRoute[] |
add(DumperRoute|DumperCollection $child)
Adds a route or collection.
Parameters
| DumperRoute|DumperCollection | $child | The route or collection |
setAll(array $children)
Sets children.
Parameters
| array | $children | The children |
Iterator|DumperCollection[]|DumperRoute[] getIterator()
Returns an iterator over the children.
Return Value
| Iterator|DumperCollection[]|DumperRoute[] | The iterator |
DumperCollection getRoot()
Returns the root of the collection.
Return Value
| DumperCollection | The root collection |
bool hasAttribute(string $name)
Returns true if the attribute is defined.
Parameters
| string | $name | The attribute name |
Return Value
| bool | true if the attribute is defined, false otherwise |
mixed getAttribute(string $name, mixed $default = null)
Returns an attribute by name.
Parameters
| string | $name | The attribute name |
| mixed | $default | Default value is the attribute doesn't exist |
Return Value
| mixed | The attribute value |
setAttribute(string $name, mixed $value)
Sets an attribute by name.
Parameters
| string | $name | The attribute name |
| mixed | $value | The attribute value |
setAttributes(array $attributes)
Sets multiple attributes.
Parameters
| array | $attributes | The attributes |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.html