@@ 174-184 (lines=11) @@ | ||
171 | } |
|
172 | ||
173 | // TODO: write a better getMultiple using mGet |
|
174 | public function getMultiple(array $keys, $namespace) { |
|
175 | ||
176 | $result = []; |
|
177 | ||
178 | foreach ( $keys as $key ) { |
|
179 | $result[$key] = $this->get($key, $namespace); |
|
180 | } |
|
181 | ||
182 | return $result; |
|
183 | ||
184 | } |
|
185 | ||
186 | // TODO: write a better setMultiple using mSet |
|
187 | public function setMultiple(array $key_values, $namespace, $ttl = null) { |
|
@@ 200-210 (lines=11) @@ | ||
197 | } |
|
198 | ||
199 | // TODO: write a better deleteMultiple using delete([]) |
|
200 | public function deleteMultiple(array $keys, $namespace) { |
|
201 | ||
202 | $result = []; |
|
203 | ||
204 | foreach ( $keys as $key ) { |
|
205 | $result[] = $this->delete($key, $namespace); |
|
206 | } |
|
207 | ||
208 | return !in_array(false, $result); |
|
209 | ||
210 | } |
|
211 | ||
212 | public function has($key, $namespace) { |
|
213 |
@@ 121-131 (lines=11) @@ | ||
118 | ||
119 | } |
|
120 | ||
121 | public function getMultiple(array $keys, $namespace) { |
|
122 | ||
123 | $result = []; |
|
124 | ||
125 | foreach ( $keys as $key ) { |
|
126 | $result[$key] = $this->get($key, $namespace); |
|
127 | } |
|
128 | ||
129 | return $result; |
|
130 | ||
131 | } |
|
132 | ||
133 | public function setMultiple(array $key_values, $namespace, $ttl = null) { |
|
134 | ||
@@ 145-155 (lines=11) @@ | ||
142 | ||
143 | } |
|
144 | ||
145 | public function deleteMultiple(array $keys, $namespace) { |
|
146 | ||
147 | $result = []; |
|
148 | ||
149 | foreach ( $keys as $key ) { |
|
150 | $result[] = $this->delete($key, $namespace); |
|
151 | } |
|
152 | ||
153 | return !in_array(false, $result); |
|
154 | ||
155 | } |
|
156 | ||
157 | public function has($key, $namespace) { |
|
158 |
@@ 92-102 (lines=11) @@ | ||
89 | ||
90 | } |
|
91 | ||
92 | public function getMultiple(array $keys, $namespace) { |
|
93 | ||
94 | $result = []; |
|
95 | ||
96 | foreach ( $keys as $key ) { |
|
97 | $result[$key] = $this->get($key, $namespace); |
|
98 | } |
|
99 | ||
100 | return $result; |
|
101 | ||
102 | } |
|
103 | ||
104 | public function setMultiple(array $key_values, $namespace, $ttl = null) { |
|
105 | ||
@@ 116-126 (lines=11) @@ | ||
113 | ||
114 | } |
|
115 | ||
116 | public function deleteMultiple(array $keys, $namespace) { |
|
117 | ||
118 | $result = []; |
|
119 | ||
120 | foreach ( $keys as $key ) { |
|
121 | $result[] = $this->delete($key, $namespace); |
|
122 | } |
|
123 | ||
124 | return !in_array(false, $result); |
|
125 | ||
126 | } |
|
127 | ||
128 | public function has($key, $namespace) { |
|
129 |