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.

getIterator()

Returns an iterator over the children.

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

at line line 43
(DumperCollection|DumperRoute)[] all()

Returns the children routes and collections.

Return Value

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

at line line 53
add(DumperRoute|DumperCollection $child)

Adds a route or collection.

Parameters

DumperRoute|DumperCollection $child The route or collection

at line line 66
setAll(array $children)

Sets children.

Parameters

array $children The children

at line line 81
Iterator getIterator()

Returns an iterator over the children.

Return Value

Iterator The iterator

at line line 91
DumperCollection getRoot()

Returns the root of the collection.

Return Value

DumperCollection The root collection

at line line 123
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

at line line 136
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

at line line 147
setAttribute(string $name, mixed $value)

Sets an attribute by name.

Parameters

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

at line line 157
setAttributes(array $attributes)

Sets multiple attributes.

Parameters

array $attributes The attributes