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 | 10 | public function __construct(array $data, $className, $dataRoot, $idName) |
|
41 | |||
42 | /** |
||
43 | * @return ArrayIterator |
||
44 | */ |
||
45 | 9 | public function getIterator() |
|
49 | |||
50 | /** |
||
51 | * @param mixed $offset |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | 5 | public function offsetExists($offset) |
|
62 | |||
63 | /** |
||
64 | * @param mixed $offset |
||
65 | * |
||
66 | * @return bool|mixed |
||
67 | */ |
||
68 | 3 | public function offsetGet($offset) |
|
75 | |||
76 | /** |
||
77 | * @param mixed $offset |
||
78 | * @param mixed $value |
||
79 | */ |
||
80 | 10 | public function offsetSet($offset, $value) |
|
85 | |||
86 | /** |
||
87 | * @param mixed $offset |
||
88 | */ |
||
89 | 1 | public function offsetUnset($offset) |
|
94 | |||
95 | /** |
||
96 | * @return int |
||
97 | */ |
||
98 | 3 | public function count() |
|
102 | |||
103 | /** |
||
104 | * @param $name |
||
105 | * |
||
106 | * @return bool|mixed |
||
107 | */ |
||
108 | 3 | public function __get($name) |
|
112 | |||
113 | /** |
||
114 | * @param $name |
||
115 | * @param $value |
||
116 | */ |
||
117 | 2 | public function __set($name, $value) |
|
121 | } |