Exemplo n.º 1
0
 /**
  * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].
  *
  * @param string $key
  * @param float|string $start double or "+inf" or "-inf" string
  * @param float|string $end double or "+inf" or "-inf" string
  *
  * @return int The number of values deleted from the sorted set
  * @link http://redis.io/commands/zremrangebyscore
  * @example
  * <pre>
  * $redis->zAdd('key', 0, 'val0');
  * $redis->zAdd('key', 2, 'val2');
  * $redis->zAdd('key', 10, 'val10');
  * $redis->zRemRangeByScore('key', 0, 3); // 2
  * </pre>
  */
 public function zRemRangeByScore($key, $start, $end)
 {
     try {
         return $this->client->zRemRangeByScore($key, $start, $end);
     } catch (Exception $e) {
         return $this->handleException($e, __FUNCTION__, func_get_args());
     }
 }
Exemplo n.º 2
0
 /**
  * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].
  *
  * @param string $key
  * @param float|string $start double or "+inf" or "-inf" string
  * @param float|string $end double or "+inf" or "-inf" string
  *
  * @return int The number of values deleted from the sorted set
  * @link http://redis.io/commands/zremrangebyscore
  * @example
  * <pre>
  * $redis->zAdd('key', 0, 'val0');
  * $redis->zAdd('key', 2, 'val2');
  * $redis->zAdd('key', 10, 'val10');
  * $redis->zRemRangeByScore('key', 0, 3); // 2
  * </pre>
  */
 public function zRemRangeByScore($key, $start, $end)
 {
     $this->appendToLog('ZREMRANGEBYSCORE ' . $key . ' ' . $start . ' ' . $end);
     return $this->client->zRemRangeByScore($key, $start, $end);
 }