浏览代码

New command: SUBSTR (Redis v2.0-dev).

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

+ 5 - 0
lib/Predis.php

@@ -1094,6 +1094,7 @@ class RedisServer_vNext extends RedisServer_v1_2 {
 
 
             /* commands operating on string values */
             /* commands operating on string values */
             'append'    => '\Predis\Commands\Append',
             'append'    => '\Predis\Commands\Append',
+            'substr'    => '\Predis\Commands\Substr',
 
 
             /* commands operating on lists */
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
@@ -1271,6 +1272,10 @@ class Append extends \Predis\BulkCommand {
     public function getCommandId() { return 'APPEND'; }
     public function getCommandId() { return 'APPEND'; }
 }
 }
 
 
+class Substr extends \Predis\InlineCommand {
+    public function getCommandId() { return 'SUBSTR'; }
+}
+
 /* commands operating on the key space */
 /* commands operating on the key space */
 class Keys extends \Predis\InlineCommand {
 class Keys extends \Predis\InlineCommand {
     public function canBeHashed()  { return false; }
     public function canBeHashed()  { return false; }