@@ 51-58 (lines=8) @@ | ||
48 | * |
|
49 | * @return static |
|
50 | */ |
|
51 | public function offsetGet($key) |
|
52 | { |
|
53 | if (is_array_accessible($this->value)) { |
|
54 | return new static($this->value[$key]); |
|
55 | } |
|
56 | ||
57 | throw new BadMethodCallException('ArrayAccess unsupported for current value.'); |
|
58 | } |
|
59 | ||
60 | /** |
|
61 | * @param mixed $key |
|
@@ 96-105 (lines=10) @@ | ||
93 | * |
|
94 | * @return void |
|
95 | */ |
|
96 | public function offsetSet($key, $value) |
|
97 | { |
|
98 | if (is_array_accessible($this->value)) { |
|
99 | $this->value[$key] = $value; |
|
100 | ||
101 | return; |
|
102 | } |
|
103 | ||
104 | throw new BadMethodCallException('ArrayAccess unsupported for current value.'); |
|
105 | } |
|
106 | ||
107 | /** |
|
108 | * @param string $field |