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.
CloneableFinalInstantiable
Constants |
Methods |
public __construct(bool $weakReferences = false) |
public beforeTraverse(array $nodes) |
public enterNode(PhpParser |
public leaveNode(PhpParser |
Properties |
private array $stack = []
|
private bool $weakReferences |