Без опису

NodeTraverserInterface.php 629B

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