Explorar o código

New command: EVALSHA (Redis v2.4-dev).

Daniele Alessandri %!s(int64=14) %!d(string=hai) anos
pai
achega
2010774b68

+ 17 - 0
lib/Predis/Commands/ServerEvalSHA.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace Predis\Commands;
+
+class ServerEvalSHA extends Command {
+    public function getId() {
+        return 'EVALSHA';
+    }
+
+    protected function onPrefixKeys(Array $arguments, $prefix) {
+        /* NOOP */
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+}

+ 1 - 0
lib/Predis/Profiles/ServerVersionNext.php

@@ -21,6 +21,7 @@ class ServerVersionNext extends ServerVersion22 {
             'info'                      => '\Predis\Commands\ServerInfoV24x',
             'client'                    => '\Predis\Commands\ServerClient',
             'eval'                      => '\Predis\Commands\ServerEval',
+            'evalsha'                   => '\Predis\Commands\ServerEvalSHA',
         ));
     }
 }