@@ 89-89 (lines=1) @@ | ||
86 | //Reads the last selected value from $data regardless if it's an array or object and overrides $this->data with the new value |
|
87 | private function moveLastToData() { |
|
88 | if (isset($this->data->{$this->last})) $this->data = $this->data->{$this->last}; |
|
89 | else if (is_array($this->data) && isset($this->data[$this->last])) $this->data = $this->data[$this->last]; |
|
90 | } |
|
91 | ||
92 | //Dot moves $data to the next object in $data foo.bar moves the $data pointer from `foo` to `bar` |
|
@@ 173-175 (lines=3) @@ | ||
170 | if ($this->autoLookup && isset($this->data->{$this->last})) { |
|
171 | return $this->processValue($this->data->{$this->last}); |
|
172 | } |
|
173 | else if (is_array($this->data) && isset($this->data[$this->last])) { |
|
174 | return $this->processValue($this->data[$this->last]); |
|
175 | } |
|
176 | throw new \UnexpectedValueException('Not found'); |
|
177 | } |
|
178 |