1 | <?php |
||
8 | final class ImmutableArrayObject extends \ArrayObject |
||
9 | { |
||
10 | /** |
||
11 | * @see \ArrayObject::offsetSet() |
||
12 | * |
||
13 | * @param mixed $index The index being set. |
||
14 | * @param mixed $newval The new value for the index. |
||
15 | * |
||
16 | * @return void |
||
17 | * |
||
18 | * @throws \LogicException Always thrown since object is immutable. |
||
19 | */ |
||
20 | public function offsetSet($index, $newval) |
||
24 | |||
25 | /** |
||
26 | * @see \ArrayObject::offsetUnset() |
||
27 | * |
||
28 | * @param mixed $index The index being unset. |
||
29 | * |
||
30 | * @return void |
||
31 | * |
||
32 | * @throws \LogicException Always thrown since object is immutable. |
||
33 | */ |
||
34 | public function offsetUnset($index) |
||
38 | |||
39 | /** |
||
40 | * @see \ArrayObject::append() |
||
41 | * |
||
42 | * @param mixed $value The value being appended. |
||
43 | * |
||
44 | * @return void |
||
45 | * |
||
46 | * @throws \LogicException Always thrown since object is immutable. |
||
47 | */ |
||
48 | public function append($value) |
||
52 | |||
53 | /** |
||
54 | * @see \ArrayObject::exchangeArray() |
||
55 | * |
||
56 | * @param mixed $array The new array or object to exchange with the current array. |
||
57 | * |
||
58 | * @return void |
||
59 | * |
||
60 | * @throws \LogicException Always thrown since object is immutable. |
||
61 | */ |
||
62 | public function exchangeArray($array) |
||
66 | |||
67 | /** |
||
68 | * Creates a new ImmutableArrayObject from the given mutable ArrayObject instance. |
||
69 | * |
||
70 | * @param \ArrayObject $arrayObject The mutable array object. |
||
71 | * |
||
72 | * @return ImmutableArrayObject |
||
73 | */ |
||
74 | public static function createFromMutable(\ArrayObject $arrayObject) |
||
78 | } |
||
79 |