| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPDeveloper\BetterDocs\Dependencies\PhpParser; |
| 4 |
|
| 5 |
interface NodeTraverserInterface |
| 6 |
{ |
| 7 |
/** |
| 8 |
* Adds a visitor. |
| 9 |
* |
| 10 |
* @param NodeVisitor $visitor Visitor to add |
| 11 |
*/ |
| 12 |
function addVisitor(NodeVisitor $visitor); |
| 13 |
|
| 14 |
/** |
| 15 |
* Removes an added visitor. |
| 16 |
* |
| 17 |
* @param NodeVisitor $visitor |
| 18 |
*/ |
| 19 |
function removeVisitor(NodeVisitor $visitor); |
| 20 |
|
| 21 |
/** |
| 22 |
* Traverses an array of nodes using the registered visitors. |
| 23 |
* |
| 24 |
* @param Node[] $nodes Array of nodes |
| 25 |
* |
| 26 |
* @return Node[] Traversed array of nodes |
| 27 |
*/ |
| 28 |
function traverse(array $nodes); |
| 29 |
} |
| 30 |
|
| 31 |
|