NodeTraverserInterface
in
Table of Contents
Methods
- addVisitor() : void
- Adds a visitor.
- removeVisitor() : void
- Removes an added visitor.
- traverse() : array<string|int, Node>
- Traverses an array of nodes using the registered visitors.
Methods
addVisitor()
Adds a visitor.
public
addVisitor(NodeVisitor $visitor) : void
Parameters
- $visitor : NodeVisitor
-
Visitor to add
removeVisitor()
Removes an added visitor.
public
removeVisitor(NodeVisitor $visitor) : void
Parameters
- $visitor : NodeVisitor
traverse()
Traverses an array of nodes using the registered visitors.
public
traverse(array<string|int, Node> $nodes) : array<string|int, Node>
Parameters
- $nodes : array<string|int, Node>
-
Array of nodes
Return values
array<string|int, Node> —Traversed array of nodes