@@ 43-53 (lines=11) @@ | ||
40 | * |
|
41 | * @param array|object $target |
|
42 | */ |
|
43 | protected function applyNodeResults(&$target) |
|
44 | { |
|
45 | if ($target instanceof self) { |
|
46 | $target = $target->getResult(); |
|
47 | $this->applyNodeResults($target); |
|
48 | } elseif (is_array($target) || is_object($target)) { |
|
49 | foreach ($target as &$value) { |
|
50 | $this->applyNodeResults($value); |
|
51 | } |
|
52 | } |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * Get the processed result |
@@ 160-169 (lines=10) @@ | ||
157 | * |
|
158 | * @param array|object $target |
|
159 | */ |
|
160 | protected function applyNodeResults(&$target) |
|
161 | { |
|
162 | foreach ($target as &$value) { |
|
163 | if ($value instanceof Node) { |
|
164 | $value = $value->getResult(); |
|
165 | } elseif (is_array($value) || is_object($value)) { |
|
166 | $this->applyNodeResults($value); |
|
167 | } |
|
168 | } |
|
169 | } |
|
170 | } |
|
171 |