Namespace PhpParser\NodeVisitor

Classes
CloningVisitor

Visitor cloning all nodes and linking to the original nodes using an attribute. This visitor is required to perform format-preserving pretty prints.

CommentAnnotatingVisitor
FindingVisitor

This visitor can be used to find and collect all nodes satisfying some criterion determined by a filter callback.

FirstFindingVisitor

This visitor can be used to find the first node satisfying some criterion determined by a filter callback.

NameResolver
NodeConnectingVisitor

Visitor that connects a child node to its parent node as well as its sibling nodes. With $weakReferences=false on the child node, the parent node can be accessed through $node->getAttribute('parent'), the previous node can be accessed through $node->getAttribute('previous'), and the next node can be accessed through $node->getAttribute('next'). With $weakReferences=true attribute names are prefixed by "weak_", e.g. "weak_parent".

ParentConnectingVisitor

Visitor that connects a child node to its parent node. With $weakReferences=false on the child node, the parent node can be accessed through $node->getAttribute('parent'). With $weakReferences=true the attribute name is "weak_parent" instead.