|
@@ 44-51 (lines=8) @@
|
| 41 |
|
* @param boolean $withscores |
| 42 |
|
* @return array |
| 43 |
|
*/ |
| 44 |
|
public function zrange($key, $start, $stop, $withscores = false) |
| 45 |
|
{ |
| 46 |
|
$this->init(); |
| 47 |
|
if ($this->actualDriver() === self::DRIVER_PREDIS) { |
| 48 |
|
return $this->driver->zrange($key, $start, $stop, ['WITHSCORES' => $withscores]); |
| 49 |
|
} |
| 50 |
|
return $this->driver->zrange($key, $start, $stop, $withscores); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Return a range of members in a sorted set, by index, with scores ordered from high to low |
|
@@ 61-68 (lines=8) @@
|
| 58 |
|
* @param boolean $withscores |
| 59 |
|
* @return array |
| 60 |
|
*/ |
| 61 |
|
public function zrevrange($key, $start, $stop, $withscores = false) |
| 62 |
|
{ |
| 63 |
|
$this->init(); |
| 64 |
|
if ($this->actualDriver() === self::DRIVER_PREDIS) { |
| 65 |
|
return $this->driver->zrevrange($key, $start, $stop, ['WITHSCORES' => $withscores]); |
| 66 |
|
} |
| 67 |
|
return $this->driver->zrevrange($key, $start, $stop, $withscores); |
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
|