@@ 189-198 (lines=10) @@ | ||
186 | return $this->del(...$key); |
|
187 | } |
|
188 | ||
189 | public function scan(&$iterator, $pattern = null, $count = null) |
|
190 | { |
|
191 | $this->init(); |
|
192 | if ($this->driver instanceof Client) { |
|
193 | $returned = $this->driver->scan($iterator, ['match' => $pattern, 'count' => $count]); |
|
194 | $iterator = $returned[0]; |
|
195 | return $returned[1]; |
|
196 | } |
|
197 | return $this->driver->scan($iterator, $pattern, $count); |
|
198 | } |
|
199 | ||
200 | /** |
|
201 | * Get the value of a hash field |
|
@@ 232-241 (lines=10) @@ | ||
229 | return $res; |
|
230 | } |
|
231 | ||
232 | public function hscan($key, &$iterator, $pattern = null, $count = null) |
|
233 | { |
|
234 | $this->init(); |
|
235 | if ($this->driver instanceof Client) { |
|
236 | $returned = $this->driver->hscan($key, $iterator, ['match' => $pattern, 'count' => $count]); |
|
237 | $iterator = $returned[0]; |
|
238 | return $returned[1]; |
|
239 | } |
|
240 | return $this->driver->hscan($key, $iterator, $pattern, $count); |
|
241 | } |
|
242 | ||
243 | public function zscan($key, &$iterator, $pattern = null, $count = null) |
|
244 | { |
|
@@ 243-252 (lines=10) @@ | ||
240 | return $this->driver->hscan($key, $iterator, $pattern, $count); |
|
241 | } |
|
242 | ||
243 | public function zscan($key, &$iterator, $pattern = null, $count = null) |
|
244 | { |
|
245 | $this->init(); |
|
246 | if ($this->driver instanceof Client) { |
|
247 | $returned = $this->driver->zscan($key, $iterator, ['match' => $pattern, 'count' => $count]); |
|
248 | $iterator = $returned[0]; |
|
249 | return $returned[1]; |
|
250 | } |
|
251 | return $this->driver->zscan($key, $iterator, $pattern, $count); |
|
252 | } |
|
253 | ||
254 | public function sscan($key, &$iterator, $pattern = null, $count = null) |
|
255 | { |
|
@@ 254-263 (lines=10) @@ | ||
251 | return $this->driver->zscan($key, $iterator, $pattern, $count); |
|
252 | } |
|
253 | ||
254 | public function sscan($key, &$iterator, $pattern = null, $count = null) |
|
255 | { |
|
256 | $this->init(); |
|
257 | if ($this->driver instanceof Client) { |
|
258 | $returned = $this->driver->sscan($key, $iterator, ['match' => $pattern, 'count' => $count]); |
|
259 | $iterator = $returned[0]; |
|
260 | return $returned[1]; |
|
261 | } |
|
262 | return $this->driver->sscan($key, $iterator, $pattern, $count); |
|
263 | } |
|
264 | } |
|
265 |