|
@@ 75-75 (lines=1) @@
|
| 72 |
|
//Reads the last selected value from $data regardless if it's an array or object and overrides $this->data with the new value |
| 73 |
|
private function moveLastToData() { |
| 74 |
|
if (isset($this->data->{$this->last})) $this->data = $this->data->{$this->last}; |
| 75 |
|
else if (is_array($this->data) && isset($this->data[$this->last])) $this->data = $this->data[$this->last]; |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
//Dot moves $data to the next object in $data foo.bar moves the $data pointer from `foo` to `bar` |
|
@@ 156-158 (lines=3) @@
|
| 153 |
|
if ($this->autoLookup && isset($this->data->{$this->last})) { |
| 154 |
|
return $this->processValue($this->data->{$this->last}); |
| 155 |
|
} |
| 156 |
|
else if (is_array($this->data) && isset($this->data[$this->last])) { |
| 157 |
|
return $this->processValue($this->data[$this->last]); |
| 158 |
|
} |
| 159 |
|
throw new \UnexpectedValueException('Not found'); |
| 160 |
|
} |
| 161 |
|
|