Copied!

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

Cloneable Instantiable
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
 
  • var callable Filter callback
protected $foundNodes
 
  • var Node [] Found nodes
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only