1 | <?php |
||
14 | class Store implements ArrayAccess, Countable, IteratorAggregate |
||
15 | { |
||
16 | protected $items = []; |
||
17 | |||
18 | private $className; |
||
19 | |||
20 | /** |
||
21 | * Store constructor. |
||
22 | * |
||
23 | * @param array $data |
||
24 | * @param string $className |
||
25 | * @param string $dataRoot |
||
26 | * @param string $idName |
||
27 | */ |
||
28 | 13 | public function __construct(array $data, $className, $dataRoot, $idName) |
|
42 | |||
43 | /** |
||
44 | * @return ArrayIterator |
||
45 | */ |
||
46 | 11 | public function getIterator() |
|
50 | |||
51 | /** |
||
52 | * @param mixed $offset |
||
53 | * |
||
54 | * @return bool |
||
55 | */ |
||
56 | 5 | public function offsetExists($offset) |
|
63 | |||
64 | /** |
||
65 | * @param mixed $offset |
||
66 | * |
||
67 | * @return bool|mixed |
||
68 | */ |
||
69 | 3 | public function offsetGet($offset) |
|
76 | |||
77 | /** |
||
78 | * @param mixed $offset |
||
79 | * @param mixed $value |
||
80 | */ |
||
81 | 13 | public function offsetSet($offset, $value) |
|
89 | |||
90 | /** |
||
91 | * @param mixed $offset |
||
92 | */ |
||
93 | 1 | public function offsetUnset($offset) |
|
98 | |||
99 | /** |
||
100 | * @return int |
||
101 | */ |
||
102 | 5 | public function count() |
|
106 | |||
107 | /** |
||
108 | * @param $name |
||
109 | * |
||
110 | * @return bool|mixed |
||
111 | */ |
||
112 | 3 | public function __get($name) |
|
116 | |||
117 | /** |
||
118 | * @param $name |
||
119 | * @param $value |
||
120 | */ |
||
121 | 2 | public function __set($name, $value) |
|
125 | } |