W3cubDocs

/Symfony 2.7

Symfony\Component\Routing\Matcher\Dumper\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 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

public (DumperCollection|DumperRoute)[] all()

Returns the children routes and collections.

Return Value

(DumperCollection|DumperRoute)[] Array of DumperCollection|DumperRoute

public add(DumperRoute|DumperCollection $child)

Adds a route or collection

Parameters

DumperRoute|DumperCollection $child The route or collection

public setAll(array $children)

Sets children.

Parameters

array $children The children

public Iterator getIterator()

Returns an iterator over the children.

Return Value

Iterator The iterator

public DumperCollection getRoot()

Returns the root of the collection.

Return Value

DumperCollection The root collection

public 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

public 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

public setAttribute(string $name, mixed $value)

Sets an attribute by name.

Parameters

string $name The attribute name
mixed $value The attribute value

public setAttributes(array $attributes)

Sets multiple attributes.

Parameters

array $attributes The attributes

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.html