Эх сурвалжийг харах

Merge branch 'v0.9/commands'

Daniele Alessandri 11 жил өмнө
parent
commit
b7ac108d43
100 өөрчлөгдсөн 291 нэмэгдсэн , 124 устгасан
  1. 10 0
      CHANGELOG.md
  2. 5 5
      README.md
  3. 11 11
      examples/MasterSlaveReplicationComplex.php
  4. 7 6
      examples/ServerSideScripting.php
  5. 2 2
      lib/Predis/Client.php
  6. 2 2
      lib/Predis/Cluster/PredisStrategy.php
  7. 2 2
      lib/Predis/Cluster/RedisStrategy.php
  8. 2 4
      lib/Predis/Command/Command.php
  9. 1 1
      lib/Predis/Command/ConnectionAuth.php
  10. 1 1
      lib/Predis/Command/ConnectionEcho.php
  11. 1 1
      lib/Predis/Command/ConnectionPing.php
  12. 1 1
      lib/Predis/Command/ConnectionQuit.php
  13. 1 1
      lib/Predis/Command/ConnectionSelect.php
  14. 1 1
      lib/Predis/Command/HashDelete.php
  15. 1 1
      lib/Predis/Command/HashExists.php
  16. 1 1
      lib/Predis/Command/HashGet.php
  17. 1 1
      lib/Predis/Command/HashGetAll.php
  18. 1 1
      lib/Predis/Command/HashGetMultiple.php
  19. 1 1
      lib/Predis/Command/HashIncrementBy.php
  20. 1 1
      lib/Predis/Command/HashIncrementByFloat.php
  21. 1 1
      lib/Predis/Command/HashKeys.php
  22. 1 1
      lib/Predis/Command/HashLength.php
  23. 1 1
      lib/Predis/Command/HashScan.php
  24. 1 1
      lib/Predis/Command/HashSet.php
  25. 1 1
      lib/Predis/Command/HashSetMultiple.php
  26. 1 1
      lib/Predis/Command/HashSetPreserve.php
  27. 1 1
      lib/Predis/Command/HashValues.php
  28. 1 1
      lib/Predis/Command/KeyDelete.php
  29. 1 1
      lib/Predis/Command/KeyDump.php
  30. 1 1
      lib/Predis/Command/KeyExists.php
  31. 1 1
      lib/Predis/Command/KeyExpire.php
  32. 1 1
      lib/Predis/Command/KeyExpireAt.php
  33. 1 1
      lib/Predis/Command/KeyKeys.php
  34. 1 1
      lib/Predis/Command/KeyMove.php
  35. 1 1
      lib/Predis/Command/KeyPersist.php
  36. 1 1
      lib/Predis/Command/KeyRandom.php
  37. 1 1
      lib/Predis/Command/KeyRename.php
  38. 1 1
      lib/Predis/Command/KeyRestore.php
  39. 1 1
      lib/Predis/Command/KeyScan.php
  40. 1 1
      lib/Predis/Command/KeySort.php
  41. 1 1
      lib/Predis/Command/KeyTimeToLive.php
  42. 1 1
      lib/Predis/Command/KeyType.php
  43. 1 1
      lib/Predis/Command/ListIndex.php
  44. 1 1
      lib/Predis/Command/ListInsert.php
  45. 1 1
      lib/Predis/Command/ListLength.php
  46. 1 1
      lib/Predis/Command/ListPopFirst.php
  47. 1 1
      lib/Predis/Command/ListPopFirstBlocking.php
  48. 1 1
      lib/Predis/Command/ListPopLast.php
  49. 1 1
      lib/Predis/Command/ListPopLastPushHead.php
  50. 1 1
      lib/Predis/Command/ListPopLastPushHeadBlocking.php
  51. 1 1
      lib/Predis/Command/ListPushHeadX.php
  52. 1 1
      lib/Predis/Command/ListPushTail.php
  53. 1 1
      lib/Predis/Command/ListPushTailX.php
  54. 1 1
      lib/Predis/Command/ListRange.php
  55. 1 1
      lib/Predis/Command/ListRemove.php
  56. 1 1
      lib/Predis/Command/ListSet.php
  57. 1 1
      lib/Predis/Command/ListTrim.php
  58. 1 1
      lib/Predis/Command/PubSubPublish.php
  59. 1 1
      lib/Predis/Command/PubSubPubsub.php
  60. 1 1
      lib/Predis/Command/PubSubSubscribe.php
  61. 1 1
      lib/Predis/Command/PubSubUnsubscribe.php
  62. 158 0
      lib/Predis/Command/RawCommand.php
  63. 2 2
      lib/Predis/Command/ScriptCommand.php
  64. 1 1
      lib/Predis/Command/ServerBackgroundRewriteAOF.php
  65. 1 1
      lib/Predis/Command/ServerBackgroundSave.php
  66. 1 1
      lib/Predis/Command/ServerClient.php
  67. 1 1
      lib/Predis/Command/ServerConfig.php
  68. 1 1
      lib/Predis/Command/ServerDatabaseSize.php
  69. 1 1
      lib/Predis/Command/ServerEval.php
  70. 1 1
      lib/Predis/Command/ServerFlushAll.php
  71. 1 1
      lib/Predis/Command/ServerFlushDatabase.php
  72. 1 1
      lib/Predis/Command/ServerInfo.php
  73. 1 1
      lib/Predis/Command/ServerLastSave.php
  74. 1 1
      lib/Predis/Command/ServerMonitor.php
  75. 1 1
      lib/Predis/Command/ServerObject.php
  76. 1 1
      lib/Predis/Command/ServerSave.php
  77. 1 1
      lib/Predis/Command/ServerScript.php
  78. 1 1
      lib/Predis/Command/ServerSentinel.php
  79. 1 1
      lib/Predis/Command/ServerShutdown.php
  80. 1 1
      lib/Predis/Command/ServerSlaveOf.php
  81. 1 1
      lib/Predis/Command/ServerSlowlog.php
  82. 1 1
      lib/Predis/Command/ServerTime.php
  83. 1 1
      lib/Predis/Command/SetAdd.php
  84. 1 1
      lib/Predis/Command/SetCardinality.php
  85. 1 1
      lib/Predis/Command/SetIntersection.php
  86. 1 1
      lib/Predis/Command/SetIntersectionStore.php
  87. 1 1
      lib/Predis/Command/SetIsMember.php
  88. 1 1
      lib/Predis/Command/SetMembers.php
  89. 1 1
      lib/Predis/Command/SetMove.php
  90. 1 1
      lib/Predis/Command/SetPop.php
  91. 1 1
      lib/Predis/Command/SetRandomMember.php
  92. 1 1
      lib/Predis/Command/SetRemove.php
  93. 1 1
      lib/Predis/Command/SetScan.php
  94. 1 1
      lib/Predis/Command/StringAppend.php
  95. 1 1
      lib/Predis/Command/StringBitCount.php
  96. 1 1
      lib/Predis/Command/StringBitOp.php
  97. 1 1
      lib/Predis/Command/StringDecrement.php
  98. 1 1
      lib/Predis/Command/StringDecrementBy.php
  99. 1 1
      lib/Predis/Command/StringGet.php
  100. 1 1
      lib/Predis/Command/StringGetBit.php

+ 10 - 0
CHANGELOG.md

@@ -36,6 +36,16 @@ v0.9.0 (201x-xx-xx)
     - `fire-and-forget`: returns a pipeline that does not read back responses
       (class: `Predis\Pipeline\FireAndForget`).
 
+- It is now possible to execute "raw commands" using `Predis\Command\RawCommand`
+  and a variable list of command arguments. Input arguments are not filtered and
+  responses are not parsed, which means arguments must follow the signature of
+  the command as defined by Redis and complex responses are left untouched.
+
+- The two base abstract command classes have been renamed in the following way:
+
+    - `Predis\Command\AbstractCommand` is now `Predis\Command\Command`
+    - `Predis\Command\ScriptedCommand` is now `Predis\Command\ScriptCommand`
+
 - Most classes and interfaces in the `Predis\Protocol` namespace have been moved
   or renamed while rationalizing the whole API of external protocol processors.
 

+ 5 - 5
README.md

@@ -161,7 +161,7 @@ a new class that matches the command type and its behaviour and then bind it to
 runtime. Actually, it is easier done than said:
 
 ```php
-class BrandNewRedisCommand extends Predis\Command\AbstractCommand
+class BrandNewRedisCommand extends Predis\Command\Command
 {
     public function getId()
     {
@@ -177,14 +177,14 @@ $redis->newcmd();
 
 ### Abstraction for handling Lua scripts as plain Redis commands ###
 
-A scripted command in Predis is an abstraction for [Lua scripting](http://redis.io/commands/eval)
+A scriptable command in Predis is an abstraction for [Lua scripting](http://redis.io/commands/eval)
 in Redis >= 2.6 allowing to use a Lua script as if it was a Redis command registered in the profile
-used by the client. Internally scripted commands use [EVALSHA](http://redis.io/commands/evalsha) to
-refer to a Lua script by its SHA1 hash in order to save bandwidth, but they are capable of falling
+used by the client. Internally scriptable commands use [EVALSHA](http://redis.io/commands/evalsha) to
+identify a Lua script by its SHA1 hash in order to save bandwidth, but they are capable of falling
 back to [EVAL](http://redis.io/commands/eval) when needed:
 
 ```php
-class ListPushRandomValue extends Predis\Command\ScriptedCommand
+class ListPushRandomValue extends Predis\Command\ScriptCommand
 {
     public function getKeysCount()
     {

+ 11 - 11
examples/MasterSlaveReplicationComplex.php

@@ -11,23 +11,23 @@
 
 require 'SharedConfigurations.php';
 
-// Predis allows to set Lua scripts as read-only operations in the context of
-// replication. This works for both EVAL and EVALSHA and also for the client-side
-// abstraction built upon them (Predis\Command\ScriptedCommand). This example
-// shows a slightly more complex configuration that injects a new scripted command
-// in the server profile used by the new client instance and marks it marks it as
-// a read-only operation for replication so that it will be executed on slaves.
-
-use Predis\Command\ScriptedCommand;
+// Predis allows to set Lua scripts as read-only operations for replication.
+// This works for both EVAL and EVALSHA and also for the client-side abstraction
+// built upon them (Predis\Command\ScriptCommand). This example shows a slightly
+// more complex configuration that injects a new script command in the server
+// profile used by the new client instance and marks it marks it as a read-only
+// operation for replication so that it will be executed on slaves.
+
+use Predis\Command\ScriptCommand;
 use Predis\Connection\MasterSlaveReplication;
 use Predis\Replication\ReplicationStrategy;
 
 // ------------------------------------------------------------------------- //
 
-// Define a new scripted command that returns all the fields
-// of a variable number of hashes with a single roundtrip.
+// Define a new script command that returns all the fields of a variable number
+// of hashes with a single roundtrip.
 
-class HashMultipleGetAll extends ScriptedCommand {
+class HashMultipleGetAll extends ScriptCommand {
     const BODY = <<<EOS
 local hashes = {}
 for _, key in pairs(KEYS) do

+ 7 - 6
examples/ServerSideScripting.php

@@ -13,14 +13,15 @@ require 'SharedConfigurations.php';
 
 // This example will not work with versions of Redis < 2.6.
 //
-// Additionally to the EVAL command defined in the current development profile, the new
-// Predis\Command\ScriptedCommand base class can be used to build an higher abstraction
-// for our "scripted" commands so that they will appear just like any other command on
-// the client-side. This is a quick example used to implement INCREX.
+// Additionally to the EVAL command defined in the current development profile,
+// the Predis\Command\ScriptCommand class can be used to build an higher level
+// abstraction for "scriptable" commands so that they will appear just like any
+// other command on the client-side. This is a quick example used to implement
+// INCREX.
 
-use Predis\Command\ScriptedCommand;
+use Predis\Command\ScriptCommand;
 
-class IncrementExistingKeysBy extends ScriptedCommand
+class IncrementExistingKeysBy extends ScriptCommand
 {
     public function getKeysCount()
     {

+ 2 - 2
lib/Predis/Client.php

@@ -14,7 +14,7 @@ namespace Predis;
 use InvalidArgumentException;
 use UnexpectedValueException;
 use Predis\Command\CommandInterface;
-use Predis\Command\ScriptedCommand;
+use Predis\Command\ScriptCommand;
 use Predis\Configuration;
 use Predis\Connection\AggregatedConnectionInterface;
 use Predis\Connection\ConnectionInterface;
@@ -299,7 +299,7 @@ class Client implements ClientInterface
      */
     protected function onResponseError(CommandInterface $command, Response\ErrorInterface $response)
     {
-        if ($command instanceof ScriptedCommand && $response->getErrorType() === 'NOSCRIPT') {
+        if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
             $eval = $this->createCommand('eval');
             $eval->setRawArguments($command->getEvalArguments());
 

+ 2 - 2
lib/Predis/Cluster/PredisStrategy.php

@@ -13,7 +13,7 @@ namespace Predis\Cluster;
 
 use Predis\Cluster\Hash\HashGeneratorInterface;
 use Predis\Command\CommandInterface;
-use Predis\Command\ScriptedCommand;
+use Predis\Command\ScriptCommand;
 
 /**
  * Default class used by Predis for client-side sharding to calculate
@@ -300,7 +300,7 @@ class PredisStrategy implements StrategyInterface
      */
     protected function getKeyFromScriptingCommands(CommandInterface $command)
     {
-        if ($command instanceof ScriptedCommand) {
+        if ($command instanceof ScriptCommand) {
             $keys = $command->getKeys();
         } else {
             $keys = array_slice($args = $command->getArguments(), 2, $args[1]);

+ 2 - 2
lib/Predis/Cluster/RedisStrategy.php

@@ -12,7 +12,7 @@
 namespace Predis\Cluster;
 
 use Predis\Command\CommandInterface;
-use Predis\Command\ScriptedCommand;
+use Predis\Command\ScriptCommand;
 
 /**
  * Default class used by Predis to calculate hashes out of keys of
@@ -250,7 +250,7 @@ class RedisStrategy implements StrategyInterface
      */
     protected function getKeyFromScriptingCommands(CommandInterface $command)
     {
-        if ($command instanceof ScriptedCommand) {
+        if ($command instanceof ScriptCommand) {
             $keys = $command->getKeys();
         } else {
             $keys = array_slice($args = $command->getArguments(), 2, $args[1]);

+ 2 - 4
lib/Predis/Command/AbstractCommand.php → lib/Predis/Command/Command.php

@@ -16,7 +16,7 @@ namespace Predis\Command;
  *
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-abstract class AbstractCommand implements CommandInterface
+abstract class Command implements CommandInterface
 {
     private $hash;
     private $arguments = array();
@@ -42,9 +42,7 @@ abstract class AbstractCommand implements CommandInterface
     }
 
     /**
-     * Sets the arguments array without filtering.
-     *
-     * @param array $arguments List of arguments.
+     * {@inheritdoc}
      */
     public function setRawArguments(array $arguments)
     {

+ 1 - 1
lib/Predis/Command/ConnectionAuth.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/auth
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ConnectionAuth extends AbstractCommand
+class ConnectionAuth extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ConnectionEcho.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/echo
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ConnectionEcho extends AbstractCommand
+class ConnectionEcho extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ConnectionPing.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/ping
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ConnectionPing extends AbstractCommand
+class ConnectionPing extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ConnectionQuit.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/quit
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ConnectionQuit extends AbstractCommand
+class ConnectionQuit extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ConnectionSelect.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/select
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ConnectionSelect extends AbstractCommand
+class ConnectionSelect extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashDelete.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hdel
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashDelete extends AbstractCommand
+class HashDelete extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashExists.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hexists
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashExists extends AbstractCommand
+class HashExists extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashGet.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hget
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashGet extends AbstractCommand
+class HashGet extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashGetAll.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hgetall
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashGetAll extends AbstractCommand
+class HashGetAll extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashGetMultiple.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hmget
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashGetMultiple extends AbstractCommand
+class HashGetMultiple extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashIncrementBy.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hincrby
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashIncrementBy extends AbstractCommand
+class HashIncrementBy extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashIncrementByFloat.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hincrbyfloat
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashIncrementByFloat extends AbstractCommand
+class HashIncrementByFloat extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashKeys.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hkeys
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashKeys extends AbstractCommand
+class HashKeys extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashLength.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hlen
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashLength extends AbstractCommand
+class HashLength extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashScan.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hscan
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashScan extends AbstractCommand
+class HashScan extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashSet.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hset
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashSet extends AbstractCommand
+class HashSet extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashSetMultiple.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hmset
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashSetMultiple extends AbstractCommand
+class HashSetMultiple extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashSetPreserve.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hsetnx
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashSetPreserve extends AbstractCommand
+class HashSetPreserve extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/HashValues.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/hvals
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class HashValues extends AbstractCommand
+class HashValues extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyDelete.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/del
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyDelete extends AbstractCommand
+class KeyDelete extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyDump.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/dump
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyDump extends AbstractCommand
+class KeyDump extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyExists.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/exists
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyExists extends AbstractCommand
+class KeyExists extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyExpire.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/expire
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyExpire extends AbstractCommand
+class KeyExpire extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyExpireAt.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/expireat
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyExpireAt extends AbstractCommand
+class KeyExpireAt extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyKeys.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/keys
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyKeys extends AbstractCommand
+class KeyKeys extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyMove.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/move
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyMove extends AbstractCommand
+class KeyMove extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyPersist.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/persist
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyPersist extends AbstractCommand
+class KeyPersist extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyRandom.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/randomkey
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyRandom extends AbstractCommand
+class KeyRandom extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyRename.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/rename
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyRename extends AbstractCommand
+class KeyRename extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyRestore.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/restore
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyRestore extends AbstractCommand
+class KeyRestore extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyScan.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/scan
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyScan extends AbstractCommand
+class KeyScan extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeySort.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sort
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeySort extends AbstractCommand
+class KeySort extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyTimeToLive.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/ttl
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyTimeToLive extends AbstractCommand
+class KeyTimeToLive extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/KeyType.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/type
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class KeyType extends AbstractCommand
+class KeyType extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListIndex.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lindex
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListIndex extends AbstractCommand
+class ListIndex extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListInsert.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/linsert
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListInsert extends AbstractCommand
+class ListInsert extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListLength.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/llen
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListLength extends AbstractCommand
+class ListLength extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPopFirst.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lpop
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPopFirst extends AbstractCommand
+class ListPopFirst extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPopFirstBlocking.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/blpop
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPopFirstBlocking extends AbstractCommand
+class ListPopFirstBlocking extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPopLast.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/rpop
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPopLast extends AbstractCommand
+class ListPopLast extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPopLastPushHead.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/rpoplpush
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPopLastPushHead extends AbstractCommand
+class ListPopLastPushHead extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPopLastPushHeadBlocking.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/brpoplpush
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPopLastPushHeadBlocking extends AbstractCommand
+class ListPopLastPushHeadBlocking extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPushHeadX.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lpushx
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPushHeadX extends AbstractCommand
+class ListPushHeadX extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPushTail.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/rpush
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPushTail extends AbstractCommand
+class ListPushTail extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListPushTailX.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/rpushx
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListPushTailX extends AbstractCommand
+class ListPushTailX extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListRange.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lrange
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListRange extends AbstractCommand
+class ListRange extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListRemove.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lrem
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListRemove extends AbstractCommand
+class ListRemove extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListSet.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lset
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListSet extends AbstractCommand
+class ListSet extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ListTrim.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/ltrim
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ListTrim extends AbstractCommand
+class ListTrim extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/PubSubPublish.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/publish
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class PubSubPublish extends AbstractCommand
+class PubSubPublish extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/PubSubPubsub.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/pubsub
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class PubSubPubsub extends AbstractCommand
+class PubSubPubsub extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/PubSubSubscribe.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/subscribe
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class PubSubSubscribe extends AbstractCommand
+class PubSubSubscribe extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/PubSubUnsubscribe.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/unsubscribe
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class PubSubUnsubscribe extends AbstractCommand
+class PubSubUnsubscribe extends Command
 {
     /**
      * {@inheritdoc}

+ 158 - 0
lib/Predis/Command/RawCommand.php

@@ -0,0 +1,158 @@
+<?php
+
+/*
+ * This file is part of the Predis package.
+ *
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Predis\Command;
+
+use InvalidArgumentException;
+
+/**
+ * Class for generic "anonymous" Redis commands.
+ *
+ * This command class does not filter input arguments or parse responses, but
+ * can be used to leverage the standard Predis API to execute any command simply
+ * by providing the needed arguments following the command signature as defined
+ * by Redis in its documentation.
+ *
+ * @author Daniele Alessandri <suppakilla@gmail.com>
+ */
+class RawCommand implements CommandInterface
+{
+    private $hash;
+    private $commandID;
+    private $arguments;
+
+    public function __construct(array $arguments)
+    {
+        if (!$arguments) {
+            throw new InvalidArgumentException("Arguments array is missing the command ID");
+        }
+
+        $this->commandID = array_shift($arguments);
+        $this->arguments = $arguments;
+    }
+
+    /**
+     * Creates a new raw command using a variadic method.
+     *
+     * @param string $commandID Redis command ID.
+     * @param string ... Arguments list for the command.
+     */
+    public static function create($commandID /* [ $arg, ... */)
+    {
+        $arguments = func_get_args();
+        $command = new self($arguments);
+
+        return $command;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getId()
+    {
+        return $this->commandID;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setArguments(array $arguments)
+    {
+        $this->arguments = $arguments;
+        unset($this->hash);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setRawArguments(array $arguments)
+    {
+        $this->setArguments($arguments);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getArguments()
+    {
+        return $this->arguments;
+    }
+
+    /**
+     * Gets the argument from the arguments list at the specified index.
+     *
+     * @param array $arguments Position of the argument.
+     */
+    public function getArgument($index)
+    {
+        if (isset($this->arguments[$index])) {
+            return $this->arguments[$index];
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setHash($hash)
+    {
+        $this->hash = $hash;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getHash()
+    {
+        if (isset($this->hash)) {
+            return $this->hash;
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function parseResponse($data)
+    {
+        return $data;
+    }
+
+    /**
+     * Helper function used to reduce a list of arguments to a string.
+     *
+     * @param string $accumulator Temporary string.
+     * @param string $argument Current argument.
+     * @return string
+     */
+    protected function toStringArgumentReducer($accumulator, $argument)
+    {
+        if (strlen($argument) > 32) {
+            $argument = substr($argument, 0, 32) . '[...]';
+        }
+
+        $accumulator .= " $argument";
+
+        return $accumulator;
+    }
+
+    /**
+     * Returns a partial string representation of the command with its arguments.
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return array_reduce(
+            $this->getArguments(),
+            array($this, 'toStringArgumentReducer'),
+            $this->getId()
+        );
+    }
+}

+ 2 - 2
lib/Predis/Command/ScriptedCommand.php → lib/Predis/Command/ScriptCommand.php

@@ -13,12 +13,12 @@ namespace Predis\Command;
 
 /**
  * Base class used to implement an higher level abstraction for "virtual"
- * commands based on EVAL.
+ * commands for Lua scripting based on EVAL and EVALSHA.
  *
  * @link http://redis.io/commands/eval
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-abstract class ScriptedCommand extends ServerEvalSHA
+abstract class ScriptCommand extends ServerEvalSHA
 {
     /**
      * Gets the body of a Lua script.

+ 1 - 1
lib/Predis/Command/ServerBackgroundRewriteAOF.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/bgrewriteaof
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerBackgroundRewriteAOF extends AbstractCommand
+class ServerBackgroundRewriteAOF extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerBackgroundSave.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/bgsave
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerBackgroundSave extends AbstractCommand
+class ServerBackgroundSave extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerClient.php

@@ -18,7 +18,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/client-setname
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerClient extends AbstractCommand
+class ServerClient extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerConfig.php

@@ -18,7 +18,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/config-rewrite
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerConfig extends AbstractCommand
+class ServerConfig extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerDatabaseSize.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/dbsize
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerDatabaseSize extends AbstractCommand
+class ServerDatabaseSize extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerEval.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/eval
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerEval extends AbstractCommand
+class ServerEval extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerFlushAll.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/flushall
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerFlushAll extends AbstractCommand
+class ServerFlushAll extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerFlushDatabase.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/flushdb
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerFlushDatabase extends AbstractCommand
+class ServerFlushDatabase extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerInfo.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/info
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerInfo extends AbstractCommand
+class ServerInfo extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerLastSave.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/lastsave
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerLastSave extends AbstractCommand
+class ServerLastSave extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerMonitor.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/monitor
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerMonitor extends AbstractCommand
+class ServerMonitor extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerObject.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/object
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerObject extends AbstractCommand
+class ServerObject extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerSave.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/save
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerSave extends AbstractCommand
+class ServerSave extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerScript.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/script
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerScript extends AbstractCommand
+class ServerScript extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerSentinel.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/topics/sentinel
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerSentinel extends AbstractCommand
+class ServerSentinel extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerShutdown.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/shutdown
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerShutdown extends AbstractCommand
+class ServerShutdown extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerSlaveOf.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/slaveof
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerSlaveOf extends AbstractCommand
+class ServerSlaveOf extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerSlowlog.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/slowlog
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerSlowlog extends AbstractCommand
+class ServerSlowlog extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/ServerTime.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/time
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class ServerTime extends AbstractCommand
+class ServerTime extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetAdd.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sadd
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetAdd extends AbstractCommand
+class SetAdd extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetCardinality.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/scard
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetCardinality extends AbstractCommand
+class SetCardinality extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetIntersection.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sinter
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetIntersection extends AbstractCommand
+class SetIntersection extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetIntersectionStore.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sinterstore
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetIntersectionStore extends AbstractCommand
+class SetIntersectionStore extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetIsMember.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sismember
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetIsMember extends AbstractCommand
+class SetIsMember extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetMembers.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/smembers
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetMembers extends AbstractCommand
+class SetMembers extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetMove.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/smove
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetMove extends AbstractCommand
+class SetMove extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetPop.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/spop
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetPop extends AbstractCommand
+class SetPop extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetRandomMember.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/srandmember
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetRandomMember extends AbstractCommand
+class SetRandomMember extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetRemove.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/srem
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetRemove extends AbstractCommand
+class SetRemove extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/SetScan.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/sscan
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class SetScan extends AbstractCommand
+class SetScan extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringAppend.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/append
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringAppend extends AbstractCommand
+class StringAppend extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringBitCount.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/bitcount
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringBitCount extends AbstractCommand
+class StringBitCount extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringBitOp.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/bitop
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringBitOp extends AbstractCommand
+class StringBitOp extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringDecrement.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/decr
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringDecrement extends AbstractCommand
+class StringDecrement extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringDecrementBy.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/decrby
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringDecrementBy extends AbstractCommand
+class StringDecrementBy extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringGet.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/get
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringGet extends AbstractCommand
+class StringGet extends Command
 {
     /**
      * {@inheritdoc}

+ 1 - 1
lib/Predis/Command/StringGetBit.php

@@ -15,7 +15,7 @@ namespace Predis\Command;
  * @link http://redis.io/commands/getbit
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */
-class StringGetBit extends AbstractCommand
+class StringGetBit extends Command
 {
     /**
      * {@inheritdoc}

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно