class DumperPrefixCollection extends DumperCollection
Prefix tree of routes preserving routes order.
Methods
| (DumperCollection|DumperRoute)[] | all() Returns the children routes and collections. | from DumperCollection |
| add(DumperRoute|DumperCollection $child) Adds a route or collection. | from DumperCollection | |
| setAll(array $children) Sets children. | from DumperCollection | |
| Iterator | getIterator() Returns an iterator over the children. | from DumperCollection |
| DumperCollection | getRoot() Returns the root of the collection. | from DumperCollection |
| bool | hasAttribute(string $name) Returns true if the attribute is defined. | from DumperCollection |
| mixed | getAttribute(string $name, mixed $default = null) Returns an attribute by name. | from DumperCollection |
| setAttribute(string $name, mixed $value) Sets an attribute by name. | from DumperCollection | |
| setAttributes(array $attributes) Sets multiple attributes. | from DumperCollection | |
| string | getPrefix() Returns the prefix. | |
| setPrefix(string $prefix) Sets the prefix. | ||
| DumperPrefixCollection | addPrefixRoute(DumperRoute $route) Adds a route in the tree. | |
| mergeSlashNodes() Merges nodes whose prefix ends with a slash. |
Details
(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.
string getPrefix()
Returns the prefix.
setPrefix(string $prefix)
Sets the prefix.
DumperPrefixCollection addPrefixRoute(DumperRoute $route)
Adds a route in the tree.
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
Please login to continue.