| 1 | <?php | ||
| 16 | class ApplicationStub implements ArrayAccess | ||
| 17 | { | ||
| 18 | protected $attributes = []; | ||
| 19 | |||
| 20 | public function setAttributes($attributes) | ||
| 21 |     { | ||
| 22 | $this->attributes = $attributes; | ||
| 23 | } | ||
| 24 | |||
| 25 | public function instance($key, $instance) | ||
| 26 |     { | ||
| 27 | $this->attributes[$key] = $instance; | ||
| 28 | } | ||
| 29 | |||
| 30 | public function offsetExists($offset) | ||
| 31 |     { | ||
| 32 | return isset($this->attributes[$offset]); | ||
| 33 | } | ||
| 34 | |||
| 35 | public function offsetGet($key) | ||
| 36 |     { | ||
| 37 | return $this->attributes[$key]; | ||
| 38 | } | ||
| 39 | |||
| 40 | public function offsetSet($key, $value) | ||
| 41 |     { | ||
| 42 | $this->attributes[$key] = $value; | ||
| 43 | } | ||
| 44 | |||
| 45 | public function offsetUnset($key) | ||
| 46 |     { | ||
| 47 | unset($this->attributes[$key]); | ||
| 48 | } | ||
| 49 | } | ||
| 50 |