1 | <?php |
||
5 | class ArrayMap implements MapInterface |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected $state = []; |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $lastFed = []; |
||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | protected $frozen = false; |
||
19 | |||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | 1 | public function getIterator() |
|
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | 34 | public function offsetExists($offset) |
|
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 31 | public function offsetGet($offset) |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 14 | public function offsetSet($offset, $value) |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 1 | public function offsetUnset($offset) |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 23 | public function feed(array $row) |
|
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | 10 | public function isFresh(array $row) |
|
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | 20 | public function clear() |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 10 | public function incr($key, $default, $step = 1) |
|
104 | |||
105 | /** |
||
106 | * getter |
||
107 | * @param $key |
||
108 | * @return mixed|null |
||
109 | */ |
||
110 | 28 | public function __get($key) |
|
114 | |||
115 | /** |
||
116 | * @param string $key |
||
117 | * @param mixed $value |
||
118 | */ |
||
119 | 5 | public function __set($key, $value) |
|
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | 2 | public function dumpState() |
|
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | 3 | public function setState(array $state) |
|
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 9 | public function frozenIncr($key, $default, $step = 1) |
|
156 | |||
157 | /** |
||
158 | * {@inheritdoc} |
||
159 | */ |
||
160 | 6 | public function unFreeze() |
|
164 | |||
165 | /** |
||
166 | * {@inheritdoc} |
||
167 | */ |
||
168 | 6 | public function freeze() |
|
172 | } |
||
173 |