Copied!

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

CloneableInstantiable
Methods
public __construct(callable $filterCallback)
public PhpParser\NodeVisitorAbstract::afterTraverse(array $nodes)
public beforeTraverse(array $nodes)
public enterNode(PhpParser\Node $node)
public getFoundNodes() : array
 

Get found nodes satisfying the filter callback.

Nodes are returned in pre-order.

  • return \Node[] Found nodes
public PhpParser\NodeVisitorAbstract::leaveNode(PhpParser\Node $node)
Properties
protected $filterCallback = NULL
 
  • var callable Filter callback
protected $foundNodes = NULL
 
  • var \Node[] Found nodes
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration