DumperPrefixCollection
class DumperPrefixCollection extends DumperCollection
Prefix tree of routes preserving routes order.
Methods
(DumperCollection|DumperRoute)[]
all()
Returns the children routes and collections.
from DumperCollection
mixed
getAttribute(string $name, mixed $default = null)
Returns an attribute by name.
from DumperCollection
string
getPrefix()
Returns the prefix.
setPrefix(string $prefix)
Sets the prefix.
mergeSlashNodes()
Merges nodes whose prefix ends with a slash.
Details
in DumperCollection at line line 43
(DumperCollection|DumperRoute)[]
all()
Returns the children routes and collections.
in DumperCollection at line line 53
add(DumperRoute|DumperCollection $child)
Adds a route or collection.
in DumperCollection at line line 66
setAll(array $children)
Sets children.
in DumperCollection at line line 81
Iterator
getIterator()
Returns an iterator over the children.
in DumperCollection at line line 91
DumperCollection
getRoot()
Returns the root of the collection.
in DumperCollection at line line 123
bool
hasAttribute(string $name)
Returns true if the attribute is defined.
in DumperCollection at line line 136
mixed
getAttribute(string $name, mixed $default = null)
Returns an attribute by name.
in DumperCollection at line line 147
setAttribute(string $name, mixed $value)
Sets an attribute by name.
in DumperCollection at line line 157
setAttributes(array $attributes)
Sets multiple attributes.
at line line 33
string
getPrefix()
Returns the prefix.
at line line 43
setPrefix(string $prefix)
Sets the prefix.
at line line 57
DumperPrefixCollection
addPrefixRoute(DumperRoute $route)
Adds a route in the tree.
at line line 88
mergeSlashNodes()
Merges nodes whose prefix ends with a slash.
Children of a node whose prefix ends with a slash are moved to the parent node