浏览代码

Implemented ZINCRBY (Class: \Predis\Commands\ZSetIncrementBy)

Daniele Alessandri 15 年之前
父节点
当前提交
af810d9613
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      lib/Predis.php

+ 7 - 0
lib/Predis.php

@@ -259,6 +259,8 @@ class Client {
             /* commands operating on sorted sets */
             'zadd'                          => '\Predis\Commands\ZSetAdd', 
                 'zsetAdd'                   => '\Predis\Commands\ZSetAdd',
+            'zincrby'                       => '\Predis\Commands\ZSetIncrementBy', 
+                'zsetIncrementBy'           => '\Predis\Commands\ZSetIncrementBy', 
             'zrem'                          => '\Predis\Commands\ZSetRemove', 
                 'zsetRemove'                => '\Predis\Commands\ZSetRemove',
             'zrange'                        => '\Predis\Commands\ZSetRange', 
@@ -982,6 +984,11 @@ class ZSetAdd extends \Predis\BulkCommand {
     public function parseResponse($data) { return (bool) $data; }
 }
 
+class ZSetIncrementBy extends \Predis\BulkCommand {
+    public function getCommandId() { return 'ZINCRBY'; }
+    public function parseResponse($data) { return (bool) $data; }
+}
+
 class ZSetRemove extends \Predis\BulkCommand {
     public function getCommandId() { return 'ZREM'; }
     public function parseResponse($data) { return (bool) $data; }