File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 4
4
5
5
class NodeTraverser implements NodeTraverserInterface
6
6
{
7
+ /**
8
+ * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes
9
+ * of the current node will not be traversed for any visitors.
10
+ *
11
+ * For subsequent visitors enterNode() will still be called on the current
12
+ * node and leaveNode() will also be invoked for the current node.
13
+ */
14
+ const DONT_TRAVERSE_CHILDREN = 1 ;
15
+
16
+ /**
17
+ * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs
18
+ * in an array, it will be removed from the array.
19
+ *
20
+ * For subsequent visitors leaveNode() will still be invoked for the
21
+ * removed node.
22
+ */
23
+ const REMOVE_NODE = false ;
24
+
7
25
/** @var NodeVisitor[] Visitors */
8
26
protected $ visitors ;
9
27
Original file line number Diff line number Diff line change 4
4
5
5
interface NodeTraverserInterface
6
6
{
7
- /**
8
- * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes
9
- * of the current node will not be traversed for any visitors.
10
- *
11
- * For subsequent visitors enterNode() will still be called on the current
12
- * node and leaveNode() will also be invoked for the current node.
13
- */
14
- const DONT_TRAVERSE_CHILDREN = 1 ;
15
-
16
- /**
17
- * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs
18
- * in an array, it will be removed from the array.
19
- *
20
- * For subsequent visitors leaveNode() will still be invoked for the
21
- * removed node.
22
- */
23
- const REMOVE_NODE = false ;
24
-
25
7
/**
26
8
* Adds a visitor.
27
9
*
You can’t perform that action at this time.
0 commit comments