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

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

Get found node satisfying the filter callback.

Returns null if no node satisfies the filter callback.

  • return null|\Node Found node (or null if not found)
public PhpParser\NodeVisitorAbstract::leaveNode(PhpParser\Node $node)
Properties
protected $filterCallback
 
  • var callable Filter callback
protected $foundNode
 
  • var null|\Node Found node
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only