Lines Matching refs:enterNode
44 public function enterNode(Node $node);
54 The `enterNode()` method is called when a node is first encountered, before its children are
81 enterNode(Expr_FuncCall)
82 enterNode(Name)
84 enterNode(Arg)
85 enterNode(Scalar_String)
91 A common pattern is that `enterNode` is used to collect some information and then `leaveNode`
125 Doing this is supported both inside enterNode and leaveNode. However, you have to be mindful about
126 where you perform the replacement: If a node is replaced in enterNode, then the recursive traversal
128 recursion. For example, let's take the previous code sample and use enterNode instead:
131 public function enterNode(Node $node) {
222 public function enterNode(Node $node) {
230 Of course, this option is only available in enterNode, because it's already too late by the time
240 public function enterNode(Node $node) {
250 This works both in enterNode and leaveNode. Note that this particular case can also be more easily
279 $visitorA->enterNode(Stmt_Return)
280 $visitorB->enterNode(Stmt_Return)
281 $visitorA->enterNode(Expr_Variable)
282 $visitorB->enterNode(Expr_Variable)
289 That is, when visiting a node, `enterNode()` and `leaveNode()` will always be called for all
290 visitors, with the `leaveNode()` calls happening in the reverse order of the `enterNode()` calls.
305 special enterNode/leaveNode return values: