@@ 259-271 (lines=13) @@ | ||
256 | * @param integer $count |
|
257 | * @return array|boolean|null list of found keys, returns null if $iterator is 0 or '0' |
|
258 | */ |
|
259 | public function scan(&$iterator, $pattern = null, $count = null) |
|
260 | { |
|
261 | if ((string)$iterator === '0') { |
|
262 | return null; |
|
263 | } |
|
264 | $this->init(); |
|
265 | if ($this->actualDriver() === self::DRIVER_PREDIS) { |
|
266 | $returned = $this->driver->scan($iterator, ['match' => $pattern, 'count' => $count]); |
|
267 | $iterator = $returned[0]; |
|
268 | return $returned[1]; |
|
269 | } |
|
270 | return $this->driver->scan($iterator, $pattern, $count); |
|
271 | } |
|
272 | ||
273 | /** |
|
274 | * Get the value of a hash field |
|
@@ 369-381 (lines=13) @@ | ||
366 | * @param integer $count |
|
367 | * @return array|boolean|null list of found fields with associated values, returns null if $iterator is 0 or '0' |
|
368 | */ |
|
369 | public function hscan($key, &$iterator, $pattern = null, $count = null) |
|
370 | { |
|
371 | if ((string)$iterator === '0') { |
|
372 | return null; |
|
373 | } |
|
374 | $this->init(); |
|
375 | if ($this->actualDriver() === self::DRIVER_PREDIS) { |
|
376 | $returned = $this->driver->hscan($key, $iterator, ['match' => $pattern, 'count' => $count]); |
|
377 | $iterator = $returned[0]; |
|
378 | return $returned[1]; |
|
379 | } |
|
380 | return $this->driver->hscan($key, $iterator, $pattern, $count); |
|
381 | } |
|
382 | ||
383 | /** |
|
384 | * Add one or more members to a set |
|
@@ 429-441 (lines=13) @@ | ||
426 | * @param integer $count |
|
427 | * @return array|boolean|null list of found members, returns null if $iterator is 0 or '0' |
|
428 | */ |
|
429 | public function sscan($key, &$iterator, $pattern = null, $count = null) |
|
430 | { |
|
431 | if ((string)$iterator === '0') { |
|
432 | return null; |
|
433 | } |
|
434 | $this->init(); |
|
435 | if ($this->actualDriver() === self::DRIVER_PREDIS) { |
|
436 | $returned = $this->driver->sscan($key, $iterator, ['match' => $pattern, 'count' => $count]); |
|
437 | $iterator = $returned[0]; |
|
438 | return $returned[1]; |
|
439 | } |
|
440 | return $this->driver->sscan($key, $iterator, $pattern, $count); |
|
441 | } |
|
442 | ||
443 | private function convertFalseToNull($result) |
|
444 | { |