1 | <?php |
||
25 | final class DocumentData implements \ArrayAccess |
||
26 | { |
||
27 | private $data = array(); |
||
28 | |||
29 | public function __construct(array $data = array()) |
||
33 | |||
34 | 12 | /** |
|
35 | 12 | * {@inheritDoc} |
|
36 | */ |
||
37 | public function offsetExists($offset): bool |
||
41 | |||
42 | 3 | /** |
|
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | public function offsetGet($offset) |
||
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | 3 | * |
|
57 | * @throws UnsupportedOperationException Documents are immutable |
||
58 | 3 | */ |
|
59 | public function offsetSet($offset, $value): void |
||
63 | |||
64 | 3 | /** |
|
65 | * {@inheritDoc} |
||
66 | 3 | * |
|
67 | * @throws UnsupportedOperationException Documents are immutable |
||
68 | */ |
||
69 | public function offsetUnset($offset): void |
||
73 | |||
74 | /** |
||
75 | * Returns all data as an array. |
||
76 | */ |
||
77 | public function getData(): array |
||
81 | } |
||
82 |