This visitor can be used to find and collect all nodes satisfying some criterion determined by a filter callback.
CloneableInstantiable
Constants |
Methods |
public __construct(callable $filterCallback) |
public beforeTraverse(array $nodes) : ?array |
public enterNode(PhpParser |
public getFoundNodes() : array Get found nodes satisfying the filter callback. Nodes are returned in pre-order.
|
Properties |
protected $filterCallback = NULL
|
protected array $foundNodes
|