| @@ 76-91 (lines=16) @@ | ||
| 73 | * |
|
| 74 | * @param VisitorInterface $visitor |
|
| 75 | */ |
|
| 76 | public function walk(VisitorInterface $visitor) { |
|
| 77 | $node = $this; |
|
| 78 | $result = $visitor->enterNode($node); |
|
| 79 | if ($result instanceof NodeInterface) { |
|
| 80 | $node = $result; |
|
| 81 | } |
|
| 82 | if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) { |
|
| 83 | $result2 = $this->operation->walk($visitor); |
|
| 84 | if ($result2 === NodeTraverser::REMOVE_NODE) { |
|
| 85 | return NodeTraverser::REMOVE_NODE; |
|
| 86 | } elseif ($result2 instanceof NodeInterface) { |
|
| 87 | $this->operation = $result2; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | return $visitor->leaveNode($node); |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| @@ 162-177 (lines=16) @@ | ||
| 159 | * |
|
| 160 | * @param VisitorInterface $visitor |
|
| 161 | */ |
|
| 162 | public function walk(VisitorInterface $visitor) { |
|
| 163 | $node = $this; |
|
| 164 | $result = $visitor->enterNode($node); |
|
| 165 | if ($result instanceof NodeInterface) { |
|
| 166 | $node = $result; |
|
| 167 | } |
|
| 168 | if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) { |
|
| 169 | $result2 = $this->subQuery->walk($visitor); |
|
| 170 | if ($result2 === NodeTraverser::REMOVE_NODE) { |
|
| 171 | return NodeTraverser::REMOVE_NODE; |
|
| 172 | } elseif ($result2 instanceof NodeInterface) { |
|
| 173 | $this->subQuery = $result2; |
|
| 174 | } |
|
| 175 | } |
|
| 176 | return $visitor->leaveNode($node); |
|
| 177 | } |
|
| 178 | ||
| 179 | /** |
|
| 180 | * Renders the object as a SQL string. |
|