@@ 155-162 (lines=8) @@ | ||
152 | * |
|
153 | * @return mixed |
|
154 | */ |
|
155 | public function offsetGet($key) { |
|
156 | $this->displayWarning(); |
|
157 | if (is_object($this->object) && !$this->object instanceof \ArrayAccess) { |
|
158 | return $this->object->$key; |
|
159 | } else { |
|
160 | return $this->object[$key]; |
|
161 | } |
|
162 | } |
|
163 | ||
164 | /** |
|
165 | * Array access interface |
|
@@ 173-180 (lines=8) @@ | ||
170 | * |
|
171 | * @return void |
|
172 | */ |
|
173 | public function offsetUnset($key) { |
|
174 | $this->displayWarning(); |
|
175 | if (is_object($this->object) && !$this->object instanceof \ArrayAccess) { |
|
176 | unset($this->object->$key); |
|
177 | } else { |
|
178 | unset($this->object[$key]); |
|
179 | } |
|
180 | } |
|
181 | ||
182 | /** |
|
183 | * Array access interface |
|
@@ 191-198 (lines=8) @@ | ||
188 | * |
|
189 | * @return bool |
|
190 | */ |
|
191 | public function offsetExists($offset) { |
|
192 | $this->displayWarning(); |
|
193 | if (is_object($this->object) && !$this->object instanceof \ArrayAccess) { |
|
194 | return isset($this->object->$offset); |
|
195 | } else { |
|
196 | return array_key_exists($offset, $this->object); |
|
197 | } |
|
198 | } |
|
199 | } |
|
200 | ||
201 |