1 | <?php |
||
17 | class MemoryPropertySet extends AbstractPropertySet |
||
18 | { |
||
19 | /** |
||
20 | * @var ValueEntry[] |
||
21 | */ |
||
22 | protected $map = []; |
||
23 | |||
24 | /** |
||
25 | * @param string|null $prefix |
||
26 | * @param integer|null $type |
||
27 | * |
||
28 | * @return array |
||
29 | * |
||
30 | * @throws Exception\PropertyException |
||
31 | */ |
||
32 | public function getKeys($prefix = null, $type = null) |
||
55 | |||
56 | /** |
||
57 | * @param string $key |
||
58 | * |
||
59 | * @return integer |
||
60 | * |
||
61 | * @throws Exception\PropertyException |
||
62 | */ |
||
63 | public function getType($key) |
||
72 | |||
73 | /** |
||
74 | * @param string $key |
||
75 | * |
||
76 | * @return boolean |
||
77 | * |
||
78 | * @throws \OldTown\PropertySet\Exception\PropertyException |
||
79 | */ |
||
80 | public function exists($key) |
||
86 | |||
87 | /** |
||
88 | * @param string $key |
||
89 | * |
||
90 | * @return $this |
||
91 | * |
||
92 | * @throws Exception\PropertyException |
||
93 | */ |
||
94 | public function remove($key) |
||
100 | |||
101 | |||
102 | /** |
||
103 | * @return ValueEntry[] |
||
104 | */ |
||
105 | protected function getMap() |
||
109 | |||
110 | |||
111 | |||
112 | /** |
||
113 | * @param integer $type |
||
114 | * @param string $key |
||
115 | * @param mixed $value |
||
116 | * |
||
117 | * @return $this |
||
118 | * |
||
119 | * @throws Exception\PropertyException |
||
120 | */ |
||
121 | protected function setImpl($type, $key, $value) |
||
139 | |||
140 | /** |
||
141 | * @param integer $type |
||
142 | * @param string $key |
||
143 | * |
||
144 | * @return mixed |
||
145 | * |
||
146 | * @throws Exception\InvalidPropertyTypeException |
||
147 | * @throws \OldTown\PropertySet\Exception\PropertyException |
||
148 | * @throws \OldTown\PropertySet\Exception\DuplicatePropertyKeyException |
||
149 | */ |
||
150 | protected function get($type, $key) |
||
165 | } |
||
166 |