瀏覽代碼

Reorganize some Redis commands classes.

Daniele Alessandri 14 年之前
父節點
當前提交
b2575bd667
共有 68 個文件被更改,包括 248 次插入259 次删除
  1. 1 1
      lib/Predis/Commands/ConnectionAuth.php
  2. 1 1
      lib/Predis/Commands/ConnectionEcho.php
  3. 1 1
      lib/Predis/Commands/ConnectionPing.php
  4. 1 1
      lib/Predis/Commands/ConnectionQuit.php
  5. 1 1
      lib/Predis/Commands/ConnectionSelect.php
  6. 1 1
      lib/Predis/Commands/KeyDelete.php
  7. 1 1
      lib/Predis/Commands/KeyExists.php
  8. 1 1
      lib/Predis/Commands/KeyExpire.php
  9. 1 1
      lib/Predis/Commands/KeyExpireAt.php
  10. 1 1
      lib/Predis/Commands/KeyKeys.php
  11. 1 1
      lib/Predis/Commands/KeyKeysV12x.php
  12. 1 1
      lib/Predis/Commands/KeyMove.php
  13. 1 1
      lib/Predis/Commands/KeyPersist.php
  14. 1 1
      lib/Predis/Commands/KeyRandom.php
  15. 1 1
      lib/Predis/Commands/KeyRename.php
  16. 1 1
      lib/Predis/Commands/KeyRenamePreserve.php
  17. 1 1
      lib/Predis/Commands/KeySort.php
  18. 1 1
      lib/Predis/Commands/KeyTimeToLive.php
  19. 1 1
      lib/Predis/Commands/KeyType.php
  20. 1 1
      lib/Predis/Commands/PubSubPublish.php
  21. 1 1
      lib/Predis/Commands/PubSubSubscribe.php
  22. 1 1
      lib/Predis/Commands/PubSubSubscribeByPattern.php
  23. 1 1
      lib/Predis/Commands/PubSubUnsubscribe.php
  24. 1 1
      lib/Predis/Commands/PubSubUnsubscribeByPattern.php
  25. 1 1
      lib/Predis/Commands/ServerBackgroundRewriteAOF.php
  26. 1 1
      lib/Predis/Commands/ServerBackgroundSave.php
  27. 1 1
      lib/Predis/Commands/ServerClient.php
  28. 1 1
      lib/Predis/Commands/ServerConfig.php
  29. 1 1
      lib/Predis/Commands/ServerDatabaseSize.php
  30. 1 1
      lib/Predis/Commands/ServerFlushAll.php
  31. 1 1
      lib/Predis/Commands/ServerFlushDatabase.php
  32. 1 1
      lib/Predis/Commands/ServerInfo.php
  33. 1 1
      lib/Predis/Commands/ServerInfoV24x.php
  34. 1 1
      lib/Predis/Commands/ServerLastSave.php
  35. 13 0
      lib/Predis/Commands/ServerMonitor.php
  36. 1 1
      lib/Predis/Commands/ServerObject.php
  37. 1 1
      lib/Predis/Commands/ServerSave.php
  38. 1 1
      lib/Predis/Commands/ServerShutdown.php
  39. 1 1
      lib/Predis/Commands/ServerSlaveOf.php
  40. 1 1
      lib/Predis/Commands/StringAppend.php
  41. 1 1
      lib/Predis/Commands/StringDecrement.php
  42. 1 1
      lib/Predis/Commands/StringDecrementBy.php
  43. 1 1
      lib/Predis/Commands/StringGet.php
  44. 1 1
      lib/Predis/Commands/StringGetBit.php
  45. 1 1
      lib/Predis/Commands/StringGetMultiple.php
  46. 1 1
      lib/Predis/Commands/StringGetRange.php
  47. 1 1
      lib/Predis/Commands/StringGetSet.php
  48. 1 1
      lib/Predis/Commands/StringIncrement.php
  49. 1 1
      lib/Predis/Commands/StringIncrementBy.php
  50. 1 1
      lib/Predis/Commands/StringSet.php
  51. 1 1
      lib/Predis/Commands/StringSetBit.php
  52. 1 1
      lib/Predis/Commands/StringSetExpire.php
  53. 1 1
      lib/Predis/Commands/StringSetMultiple.php
  54. 1 1
      lib/Predis/Commands/StringSetMultiplePreserve.php
  55. 1 1
      lib/Predis/Commands/StringSetPreserve.php
  56. 1 1
      lib/Predis/Commands/StringSetRange.php
  57. 1 1
      lib/Predis/Commands/StringStrlen.php
  58. 1 1
      lib/Predis/Commands/StringSubstr.php
  59. 1 1
      lib/Predis/Commands/TransactionDiscard.php
  60. 1 1
      lib/Predis/Commands/TransactionExec.php
  61. 1 1
      lib/Predis/Commands/TransactionMulti.php
  62. 1 1
      lib/Predis/Commands/TransactionUnwatch.php
  63. 1 1
      lib/Predis/Commands/TransactionWatch.php
  64. 41 49
      lib/Predis/Profiles/ServerVersion12.php
  65. 55 63
      lib/Predis/Profiles/ServerVersion20.php
  66. 67 75
      lib/Predis/Profiles/ServerVersion22.php
  67. 2 2
      lib/Predis/Profiles/ServerVersionNext.php
  68. 8 8
      test/ClientFeaturesTest.php

+ 1 - 1
lib/Predis/Commands/Auth.php → lib/Predis/Commands/ConnectionAuth.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Auth extends Command {
+class ConnectionAuth extends Command {
     public function getId() {
         return 'AUTH';
     }

+ 1 - 1
lib/Predis/Commands/DoEcho.php → lib/Predis/Commands/ConnectionEcho.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class DoEcho extends Command {
+class ConnectionEcho extends Command {
     public function getId() {
         return 'ECHO';
     }

+ 1 - 1
lib/Predis/Commands/Ping.php → lib/Predis/Commands/ConnectionPing.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Ping extends Command {
+class ConnectionPing extends Command {
     public function getId() {
         return 'PING';
     }

+ 1 - 1
lib/Predis/Commands/Quit.php → lib/Predis/Commands/ConnectionQuit.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Quit extends Command {
+class ConnectionQuit extends Command {
     public function getId() {
         return 'QUIT';
     }

+ 1 - 1
lib/Predis/Commands/SelectDatabase.php → lib/Predis/Commands/ConnectionSelect.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SelectDatabase extends Command {
+class ConnectionSelect extends Command {
     public function getId() {
         return 'SELECT';
     }

+ 1 - 1
lib/Predis/Commands/Delete.php → lib/Predis/Commands/KeyDelete.php

@@ -4,7 +4,7 @@ namespace Predis\Commands;
 
 use Predis\Helpers;
 
-class Delete extends Command {
+class KeyDelete extends Command {
     public function getId() {
         return 'DEL';
     }

+ 1 - 1
lib/Predis/Commands/Exists.php → lib/Predis/Commands/KeyExists.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Exists extends Command {
+class KeyExists extends Command {
     public function getId() {
         return 'EXISTS';
     }

+ 1 - 1
lib/Predis/Commands/Expire.php → lib/Predis/Commands/KeyExpire.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Expire extends Command {
+class KeyExpire extends Command {
     public function getId() {
         return 'EXPIRE';
     }

+ 1 - 1
lib/Predis/Commands/ExpireAt.php → lib/Predis/Commands/KeyExpireAt.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class ExpireAt extends Command {
+class KeyExpireAt extends Command {
     public function getId() {
         return 'EXPIREAT';
     }

+ 1 - 1
lib/Predis/Commands/Keys.php → lib/Predis/Commands/KeyKeys.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Keys extends Command {
+class KeyKeys extends Command {
     public function getId() {
         return 'KEYS';
     }

+ 1 - 1
lib/Predis/Commands/KeysV12x.php → lib/Predis/Commands/KeyKeysV12x.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class KeysV12x extends Keys {
+class KeyKeysV12x extends KeyKeys {
     public function parseResponse($data) {
         return explode(' ', $data);
     }

+ 1 - 1
lib/Predis/Commands/MoveKey.php → lib/Predis/Commands/KeyMove.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class MoveKey extends Command {
+class KeyMove extends Command {
     public function getId() {
         return 'MOVE';
     }

+ 1 - 1
lib/Predis/Commands/Persist.php → lib/Predis/Commands/KeyPersist.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Persist extends Command {
+class KeyPersist extends Command {
     public function getId() {
         return 'PERSIST';
     }

+ 1 - 1
lib/Predis/Commands/RandomKey.php → lib/Predis/Commands/KeyRandom.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class RandomKey extends Command {
+class KeyRandom extends Command {
     public function getId() {
         return 'RANDOMKEY';
     }

+ 1 - 1
lib/Predis/Commands/Rename.php → lib/Predis/Commands/KeyRename.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Rename extends Command {
+class KeyRename extends Command {
     public function getId() {
         return 'RENAME';
     }

+ 1 - 1
lib/Predis/Commands/RenamePreserve.php → lib/Predis/Commands/KeyRenamePreserve.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class RenamePreserve extends Command {
+class KeyRenamePreserve extends Command {
     public function getId() {
         return 'RENAMENX';
     }

+ 1 - 1
lib/Predis/Commands/Sort.php → lib/Predis/Commands/KeySort.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Sort extends Command {
+class KeySort extends Command {
     public function getId() {
         return 'SORT';
     }

+ 1 - 1
lib/Predis/Commands/TimeToLive.php → lib/Predis/Commands/KeyTimeToLive.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class TimeToLive extends Command {
+class KeyTimeToLive extends Command {
     public function getId() {
         return 'TTL';
     }

+ 1 - 1
lib/Predis/Commands/Type.php → lib/Predis/Commands/KeyType.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Type extends Command {
+class KeyType extends Command {
     public function getId() {
         return 'TYPE';
     }

+ 1 - 1
lib/Predis/Commands/Publish.php → lib/Predis/Commands/PubSubPublish.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Publish extends Command {
+class PubSubPublish extends Command {
     public function getId() {
         return 'PUBLISH';
     }

+ 1 - 1
lib/Predis/Commands/Subscribe.php → lib/Predis/Commands/PubSubSubscribe.php

@@ -4,7 +4,7 @@ namespace Predis\Commands;
 
 use Predis\Helpers;
 
-class Subscribe extends Command {
+class PubSubSubscribe extends Command {
     public function getId() {
         return 'SUBSCRIBE';
     }

+ 1 - 1
lib/Predis/Commands/SubscribeByPattern.php → lib/Predis/Commands/PubSubSubscribeByPattern.php

@@ -4,7 +4,7 @@ namespace Predis\Commands;
 
 use Predis\Helpers;
 
-class SubscribeByPattern extends Command {
+class PubSubSubscribeByPattern extends Command {
     public function getId() {
         return 'PSUBSCRIBE';
     }

+ 1 - 1
lib/Predis/Commands/Unsubscribe.php → lib/Predis/Commands/PubSubUnsubscribe.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Unsubscribe extends Command {
+class PubSubUnsubscribe extends Command {
     public function getId() {
         return 'UNSUBSCRIBE';
     }

+ 1 - 1
lib/Predis/Commands/UnsubscribeByPattern.php → lib/Predis/Commands/PubSubUnsubscribeByPattern.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class UnsubscribeByPattern extends Command {
+class PubSubUnsubscribeByPattern extends Command {
     public function getId() {
         return 'PUNSUBSCRIBE';
     }

+ 1 - 1
lib/Predis/Commands/BackgroundRewriteAppendOnlyFile.php → lib/Predis/Commands/ServerBackgroundRewriteAOF.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class BackgroundRewriteAppendOnlyFile extends Command {
+class ServerBackgroundRewriteAOF extends Command {
     public function getId() {
         return 'BGREWRITEAOF';
     }

+ 1 - 1
lib/Predis/Commands/BackgroundSave.php → lib/Predis/Commands/ServerBackgroundSave.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class BackgroundSave extends Command {
+class ServerBackgroundSave extends Command {
     public function getId() {
         return 'BGSAVE';
     }

+ 1 - 1
lib/Predis/Commands/Client.php → lib/Predis/Commands/ServerClient.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Client extends Command {
+class ServerClient extends Command {
     public function getId() {
         return 'CLIENT';
     }

+ 1 - 1
lib/Predis/Commands/Config.php → lib/Predis/Commands/ServerConfig.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Config extends Command {
+class ServerConfig extends Command {
     public function getId() {
         return 'CONFIG';
     }

+ 1 - 1
lib/Predis/Commands/DatabaseSize.php → lib/Predis/Commands/ServerDatabaseSize.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class DatabaseSize extends Command {
+class ServerDatabaseSize extends Command {
     public function getId() {
         return 'DBSIZE';
     }

+ 1 - 1
lib/Predis/Commands/FlushAll.php → lib/Predis/Commands/ServerFlushAll.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class FlushAll extends Command {
+class ServerFlushAll extends Command {
     public function getId() {
         return 'FLUSHALL';
     }

+ 1 - 1
lib/Predis/Commands/FlushDatabase.php → lib/Predis/Commands/ServerFlushDatabase.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class FlushDatabase extends Command {
+class ServerFlushDatabase extends Command {
     public function getId() {
         return 'FLUSHDB';
     }

+ 1 - 1
lib/Predis/Commands/Info.php → lib/Predis/Commands/ServerInfo.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Info extends Command {
+class ServerInfo extends Command {
     public function getId() {
         return 'INFO';
     }

+ 1 - 1
lib/Predis/Commands/InfoV24x.php → lib/Predis/Commands/ServerInfoV24x.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class InfoV24x extends Info {
+class ServerInfoV24x extends ServerInfo {
     public function parseResponse($data) {
         $info      = array();
         $current   = null;

+ 1 - 1
lib/Predis/Commands/LastSave.php → lib/Predis/Commands/ServerLastSave.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class LastSave extends Command {
+class ServerLastSave extends Command {
     public function getId() {
         return 'LASTSAVE';
     }

+ 13 - 0
lib/Predis/Commands/ServerMonitor.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace Predis\Commands;
+
+class ServerMonitor extends Command {
+    public function getId() {
+        return 'MONITOR';
+    }
+
+    protected function canBeHashed() {
+        return false;
+    }
+}

+ 1 - 1
lib/Predis/Commands/DebugObject.php → lib/Predis/Commands/ServerObject.php

@@ -4,7 +4,7 @@ namespace Predis\Commands;
 
 use Predis\Helpers;
 
-class DebugObject extends Command {
+class ServerObject extends Command {
     public function getId() {
         return 'OBJECT';
     }

+ 1 - 1
lib/Predis/Commands/Save.php → lib/Predis/Commands/ServerSave.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Save extends Command {
+class ServerSave extends Command {
     public function getId() {
         return 'SAVE';
     }

+ 1 - 1
lib/Predis/Commands/Shutdown.php → lib/Predis/Commands/ServerShutdown.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Shutdown extends Command {
+class ServerShutdown extends Command {
     public function getId() {
         return 'SHUTDOWN';
     }

+ 1 - 1
lib/Predis/Commands/SlaveOf.php → lib/Predis/Commands/ServerSlaveOf.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SlaveOf extends Command {
+class ServerSlaveOf extends Command {
     public function getId() {
         return 'SLAVEOF';
     }

+ 1 - 1
lib/Predis/Commands/Append.php → lib/Predis/Commands/StringAppend.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Append extends Command {
+class StringAppend extends Command {
     public function getId() {
         return 'APPEND';
     }

+ 1 - 1
lib/Predis/Commands/Decrement.php → lib/Predis/Commands/StringDecrement.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Decrement extends Command {
+class StringDecrement extends Command {
     public function getId() {
         return 'DECR';
     }

+ 1 - 1
lib/Predis/Commands/DecrementBy.php → lib/Predis/Commands/StringDecrementBy.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class DecrementBy extends Command {
+class StringDecrementBy extends Command {
     public function getId() {
         return 'DECRBY';
     }

+ 1 - 1
lib/Predis/Commands/Get.php → lib/Predis/Commands/StringGet.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Get extends Command {
+class StringGet extends Command {
     public function getId() {
         return 'GET';
     }

+ 1 - 1
lib/Predis/Commands/GetBit.php → lib/Predis/Commands/StringGetBit.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class GetBit extends Command {
+class StringGetBit extends Command {
     public function getId() {
         return 'GETBIT';
     }

+ 1 - 1
lib/Predis/Commands/GetMultiple.php → lib/Predis/Commands/StringGetMultiple.php

@@ -4,7 +4,7 @@ namespace Predis\Commands;
 
 use Predis\Helpers;
 
-class GetMultiple extends Command {
+class StringGetMultiple extends Command {
     public function getId() {
         return 'MGET';
     }

+ 1 - 1
lib/Predis/Commands/GetRange.php → lib/Predis/Commands/StringGetRange.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class GetRange extends Command {
+class StringGetRange extends Command {
     public function getId() {
         return 'GETRANGE';
     }

+ 1 - 1
lib/Predis/Commands/GetSet.php → lib/Predis/Commands/StringGetSet.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class GetSet extends Command {
+class StringGetSet extends Command {
     public function getId() {
         return 'GETSET';
     }

+ 1 - 1
lib/Predis/Commands/Increment.php → lib/Predis/Commands/StringIncrement.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Increment extends Command {
+class StringIncrement extends Command {
     public function getId() {
         return 'INCR';
     }

+ 1 - 1
lib/Predis/Commands/IncrementBy.php → lib/Predis/Commands/StringIncrementBy.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class IncrementBy extends Command {
+class StringIncrementBy extends Command {
     public function getId() {
         return 'INCRBY';
     }

+ 1 - 1
lib/Predis/Commands/Set.php → lib/Predis/Commands/StringSet.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Set extends Command {
+class StringSet extends Command {
     public function getId() {
         return 'SET';
     }

+ 1 - 1
lib/Predis/Commands/SetBit.php → lib/Predis/Commands/StringSetBit.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetBit extends Command {
+class StringSetBit extends Command {
     public function getId() {
         return 'SETBIT';
     }

+ 1 - 1
lib/Predis/Commands/SetExpire.php → lib/Predis/Commands/StringSetExpire.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetExpire extends Command {
+class StringSetExpire extends Command {
     public function getId() {
         return 'SETEX';
     }

+ 1 - 1
lib/Predis/Commands/SetMultiple.php → lib/Predis/Commands/StringSetMultiple.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetMultiple extends Command {
+class StringSetMultiple extends Command {
     public function getId() {
         return 'MSET';
     }

+ 1 - 1
lib/Predis/Commands/SetMultiplePreserve.php → lib/Predis/Commands/StringSetMultiplePreserve.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetMultiplePreserve extends SetMultiple {
+class StringSetMultiplePreserve extends StringSetMultiple {
     public function getId() {
         return 'MSETNX';
     }

+ 1 - 1
lib/Predis/Commands/SetPreserve.php → lib/Predis/Commands/StringSetPreserve.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetPreserve extends Command {
+class StringSetPreserve extends Command {
     public function getId() {
         return 'SETNX';
     }

+ 1 - 1
lib/Predis/Commands/SetRange.php → lib/Predis/Commands/StringSetRange.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class SetRange extends Command {
+class StringSetRange extends Command {
     public function getId() {
         return 'SETRANGE';
     }

+ 1 - 1
lib/Predis/Commands/Strlen.php → lib/Predis/Commands/StringStrlen.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Strlen extends Command {
+class StringStrlen extends Command {
     public function getId() {
         return 'STRLEN';
     }

+ 1 - 1
lib/Predis/Commands/Substr.php → lib/Predis/Commands/StringSubstr.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Substr extends Command {
+class StringSubstr extends Command {
     public function getId() {
         return 'SUBSTR';
     }

+ 1 - 1
lib/Predis/Commands/Discard.php → lib/Predis/Commands/TransactionDiscard.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Discard extends Command {
+class TransactionDiscard extends Command {
     public function getId() {
         return 'DISCARD';
     }

+ 1 - 1
lib/Predis/Commands/Exec.php → lib/Predis/Commands/TransactionExec.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Exec extends Command {
+class TransactionExec extends Command {
     public function getId() {
         return 'EXEC';
     }

+ 1 - 1
lib/Predis/Commands/Multi.php → lib/Predis/Commands/TransactionMulti.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Multi extends Command {
+class TransactionMulti extends Command {
     public function getId() {
         return 'MULTI';
     }

+ 1 - 1
lib/Predis/Commands/Unwatch.php → lib/Predis/Commands/TransactionUnwatch.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Unwatch extends Command {
+class TransactionUnwatch extends Command {
     public function getId() {
         return 'UNWATCH';
     }

+ 1 - 1
lib/Predis/Commands/Watch.php → lib/Predis/Commands/TransactionWatch.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class Watch extends Command {
+class TransactionWatch extends Command {
     public function getId() {
         return 'WATCH';
     }

+ 41 - 49
lib/Predis/Profiles/ServerVersion12.php

@@ -8,39 +8,32 @@ class ServerVersion12 extends ServerProfile {
         return array(
             /* ---------------- Redis 1.2 ---------------- */
 
-            /* miscellaneous commands */
-            'ping'                      => '\Predis\Commands\Ping',
-            'echo'                      => '\Predis\Commands\DoEcho',
-            'auth'                      => '\Predis\Commands\Auth',
-
-            /* connection handling */
-            'quit'                      => '\Predis\Commands\Quit',
+            /* commands operating on the key space */
+            'exists'                    => '\Predis\Commands\KeyExists',
+            'del'                       => '\Predis\Commands\KeyDelete',
+            'type'                      => '\Predis\Commands\KeyType',
+            'keys'                      => '\Predis\Commands\KeyKeysV12x',
+            'randomkey'                 => '\Predis\Commands\KeyRandom',
+            'rename'                    => '\Predis\Commands\KeyRename',
+            'renamenx'                  => '\Predis\Commands\KeyRenamePreserve',
+            'expire'                    => '\Predis\Commands\KeyExpire',
+            'expireat'                  => '\Predis\Commands\KeyExpireAt',
+            'ttl'                       => '\Predis\Commands\KeyTimeToLive',
+            'move'                      => '\Predis\Commands\KeyMove',
+            'sort'                      => '\Predis\Commands\KeySort',
 
             /* commands operating on string values */
-            'set'                       => '\Predis\Commands\Set',
-            'setnx'                     => '\Predis\Commands\SetPreserve',
-            'mset'                      => '\Predis\Commands\SetMultiple',
-            'msetnx'                    => '\Predis\Commands\SetMultiplePreserve',
-            'get'                       => '\Predis\Commands\Get',
-            'mget'                      => '\Predis\Commands\GetMultiple',
-            'getset'                    => '\Predis\Commands\GetSet',
-            'incr'                      => '\Predis\Commands\Increment',
-            'incrby'                    => '\Predis\Commands\IncrementBy',
-            'decr'                      => '\Predis\Commands\Decrement',
-            'decrby'                    => '\Predis\Commands\DecrementBy',
-            'exists'                    => '\Predis\Commands\Exists',
-            'del'                       => '\Predis\Commands\Delete',
-            'type'                      => '\Predis\Commands\Type',
-
-            /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\KeysV12x',
-            'randomkey'                 => '\Predis\Commands\RandomKey',
-            'rename'                    => '\Predis\Commands\Rename',
-            'renamenx'                  => '\Predis\Commands\RenamePreserve',
-            'expire'                    => '\Predis\Commands\Expire',
-            'expireat'                  => '\Predis\Commands\ExpireAt',
-            'dbsize'                    => '\Predis\Commands\DatabaseSize',
-            'ttl'                       => '\Predis\Commands\TimeToLive',
+            'set'                       => '\Predis\Commands\StringSet',
+            'setnx'                     => '\Predis\Commands\StringSetPreserve',
+            'mset'                      => '\Predis\Commands\StringSetMultiple',
+            'msetnx'                    => '\Predis\Commands\StringSetMultiplePreserve',
+            'get'                       => '\Predis\Commands\StringGet',
+            'mget'                      => '\Predis\Commands\StringGetMultiple',
+            'getset'                    => '\Predis\Commands\StringGetSet',
+            'incr'                      => '\Predis\Commands\StringIncrement',
+            'incrby'                    => '\Predis\Commands\StringIncrementBy',
+            'decr'                      => '\Predis\Commands\StringDecrement',
+            'decrby'                    => '\Predis\Commands\StringDecrementBy',
 
             /* commands operating on lists */
             'rpush'                     => '\Predis\Commands\ListPushTail',
@@ -82,26 +75,25 @@ class ServerVersion12 extends ServerProfile {
             'zscore'                    => '\Predis\Commands\ZSetScore',
             'zremrangebyscore'          => '\Predis\Commands\ZSetRemoveRangeByScore',
 
-            /* multiple databases handling commands */
-            'select'                    => '\Predis\Commands\SelectDatabase',
-            'move'                      => '\Predis\Commands\MoveKey',
-            'flushdb'                   => '\Predis\Commands\FlushDatabase',
-            'flushall'                  => '\Predis\Commands\FlushAll',
-
-            /* sorting */
-            'sort'                      => '\Predis\Commands\Sort',
+            /* connection related commands */
+            'ping'                      => '\Predis\Commands\ConnectionPing',
+            'auth'                      => '\Predis\Commands\ConnectionAuth',
+            'select'                    => '\Predis\Commands\ConnectionSelect',
+            'echo'                      => '\Predis\Commands\ConnectionEcho',
+            'quit'                      => '\Predis\Commands\ConnectionQuit',
 
             /* remote server control commands */
-            'info'                      => '\Predis\Commands\Info',
-            'slaveof'                   => '\Predis\Commands\SlaveOf',
-            'monitor'                   => '\Predis\Commands\Monitor',
-
-            /* persistence control commands */
-            'save'                      => '\Predis\Commands\Save',
-            'bgsave'                    => '\Predis\Commands\BackgroundSave',
-            'lastsave'                  => '\Predis\Commands\LastSave',
-            'shutdown'                  => '\Predis\Commands\Shutdown',
-            'bgrewriteaof'              => '\Predis\Commands\BackgroundRewriteAppendOnlyFile',
+            'info'                      => '\Predis\Commands\ServerInfo',
+            'slaveof'                   => '\Predis\Commands\ServerSlaveOf',
+            'monitor'                   => '\Predis\Commands\ServerMonitor',
+            'dbsize'                    => '\Predis\Commands\ServerDatabaseSize',
+            'flushdb'                   => '\Predis\Commands\ServerFlushDatabase',
+            'flushall'                  => '\Predis\Commands\ServerFlushAll',
+            'save'                      => '\Predis\Commands\ServerSave',
+            'bgsave'                    => '\Predis\Commands\ServerBackgroundSave',
+            'lastsave'                  => '\Predis\Commands\ServerLastSave',
+            'shutdown'                  => '\Predis\Commands\ServerShutdown',
+            'bgrewriteaof'              => '\Predis\Commands\ServerBackgroundRewriteAOF',
         );
     }
 }

+ 55 - 63
lib/Predis/Profiles/ServerVersion20.php

@@ -8,39 +8,32 @@ class ServerVersion20 extends ServerProfile {
         return array(
             /* ---------------- Redis 1.2 ---------------- */
 
-            /* miscellaneous commands */
-            'ping'                      => '\Predis\Commands\Ping',
-            'echo'                      => '\Predis\Commands\DoEcho',
-            'auth'                      => '\Predis\Commands\Auth',
-
-            /* connection handling */
-            'quit'                      => '\Predis\Commands\Quit',
+            /* commands operating on the key space */
+            'exists'                    => '\Predis\Commands\KeyExists',
+            'del'                       => '\Predis\Commands\KeyDelete',
+            'type'                      => '\Predis\Commands\KeyType',
+            'keys'                      => '\Predis\Commands\KeyKeys',
+            'randomkey'                 => '\Predis\Commands\KeyRandom',
+            'rename'                    => '\Predis\Commands\KeyRename',
+            'renamenx'                  => '\Predis\Commands\KeyRenamePreserve',
+            'expire'                    => '\Predis\Commands\KeyExpire',
+            'expireat'                  => '\Predis\Commands\KeyExpireAt',
+            'ttl'                       => '\Predis\Commands\KeyTimeToLive',
+            'move'                      => '\Predis\Commands\KeyMove',
+            'sort'                      => '\Predis\Commands\KeySort',
 
             /* commands operating on string values */
-            'set'                       => '\Predis\Commands\Set',
-            'setnx'                     => '\Predis\Commands\SetPreserve',
-            'mset'                      => '\Predis\Commands\SetMultiple',
-            'msetnx'                    => '\Predis\Commands\SetMultiplePreserve',
-            'get'                       => '\Predis\Commands\Get',
-            'mget'                      => '\Predis\Commands\GetMultiple',
-            'getset'                    => '\Predis\Commands\GetSet',
-            'incr'                      => '\Predis\Commands\Increment',
-            'incrby'                    => '\Predis\Commands\IncrementBy',
-            'decr'                      => '\Predis\Commands\Decrement',
-            'decrby'                    => '\Predis\Commands\DecrementBy',
-            'exists'                    => '\Predis\Commands\Exists',
-            'del'                       => '\Predis\Commands\Delete',
-            'type'                      => '\Predis\Commands\Type',
-
-            /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys',
-            'randomkey'                 => '\Predis\Commands\RandomKey',
-            'rename'                    => '\Predis\Commands\Rename',
-            'renamenx'                  => '\Predis\Commands\RenamePreserve',
-            'expire'                    => '\Predis\Commands\Expire',
-            'expireat'                  => '\Predis\Commands\ExpireAt',
-            'dbsize'                    => '\Predis\Commands\DatabaseSize',
-            'ttl'                       => '\Predis\Commands\TimeToLive',
+            'set'                       => '\Predis\Commands\StringSet',
+            'setnx'                     => '\Predis\Commands\StringSetPreserve',
+            'mset'                      => '\Predis\Commands\StringSetMultiple',
+            'msetnx'                    => '\Predis\Commands\StringSetMultiplePreserve',
+            'get'                       => '\Predis\Commands\StringGet',
+            'mget'                      => '\Predis\Commands\StringGetMultiple',
+            'getset'                    => '\Predis\Commands\StringGetSet',
+            'incr'                      => '\Predis\Commands\StringIncrement',
+            'incrby'                    => '\Predis\Commands\StringIncrementBy',
+            'decr'                      => '\Predis\Commands\StringDecrement',
+            'decrby'                    => '\Predis\Commands\StringDecrementBy',
 
             /* commands operating on lists */
             'rpush'                     => '\Predis\Commands\ListPushTail',
@@ -82,39 +75,33 @@ class ServerVersion20 extends ServerProfile {
             'zscore'                    => '\Predis\Commands\ZSetScore',
             'zremrangebyscore'          => '\Predis\Commands\ZSetRemoveRangeByScore',
 
-            /* multiple databases handling commands */
-            'select'                    => '\Predis\Commands\SelectDatabase',
-            'move'                      => '\Predis\Commands\MoveKey',
-            'flushdb'                   => '\Predis\Commands\FlushDatabase',
-            'flushall'                  => '\Predis\Commands\FlushAll',
-
-            /* sorting */
-            'sort'                      => '\Predis\Commands\Sort',
+            /* connection related commands */
+            'ping'                      => '\Predis\Commands\ConnectionPing',
+            'auth'                      => '\Predis\Commands\ConnectionAuth',
+            'select'                    => '\Predis\Commands\ConnectionSelect',
+            'echo'                      => '\Predis\Commands\ConnectionEcho',
+            'quit'                      => '\Predis\Commands\ConnectionQuit',
 
             /* remote server control commands */
-            'info'                      => '\Predis\Commands\Info',
-            'slaveof'                   => '\Predis\Commands\SlaveOf',
-            'monitor'                   => '\Predis\Commands\Monitor',
-
-            /* persistence control commands */
-            'save'                      => '\Predis\Commands\Save',
-            'bgsave'                    => '\Predis\Commands\BackgroundSave',
-            'lastsave'                  => '\Predis\Commands\LastSave',
-            'shutdown'                  => '\Predis\Commands\Shutdown',
-            'bgrewriteaof'              => '\Predis\Commands\BackgroundRewriteAppendOnlyFile',
+            'info'                      => '\Predis\Commands\ServerInfo',
+            'slaveof'                   => '\Predis\Commands\ServerSlaveOf',
+            'monitor'                   => '\Predis\Commands\ServerMonitor',
+            'dbsize'                    => '\Predis\Commands\ServerDatabaseSize',
+            'flushdb'                   => '\Predis\Commands\ServerFlushDatabase',
+            'flushall'                  => '\Predis\Commands\ServerFlushAll',
+            'save'                      => '\Predis\Commands\ServerSave',
+            'bgsave'                    => '\Predis\Commands\ServerBackgroundSave',
+            'lastsave'                  => '\Predis\Commands\ServerLastSave',
+            'shutdown'                  => '\Predis\Commands\ServerShutdown',
+            'bgrewriteaof'              => '\Predis\Commands\ServerBackgroundRewriteAOF',
 
 
             /* ---------------- Redis 2.0 ---------------- */
 
-            /* transactions */
-            'multi'                     => '\Predis\Commands\Multi',
-            'exec'                      => '\Predis\Commands\Exec',
-            'discard'                   => '\Predis\Commands\Discard',
-
             /* commands operating on string values */
-            'setex'                     => '\Predis\Commands\SetExpire',
-            'append'                    => '\Predis\Commands\Append',
-            'substr'                    => '\Predis\Commands\Substr',
+            'setex'                     => '\Predis\Commands\StringSetExpire',
+            'append'                    => '\Predis\Commands\StringAppend',
+            'substr'                    => '\Predis\Commands\StringSubstr',
 
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
@@ -142,15 +129,20 @@ class ServerVersion20 extends ServerProfile {
             'hvals'                     => '\Predis\Commands\HashValues',
             'hgetall'                   => '\Predis\Commands\HashGetAll',
 
+            /* transactions */
+            'multi'                     => '\Predis\Commands\TransactionMulti',
+            'exec'                      => '\Predis\Commands\TransactionExec',
+            'discard'                   => '\Predis\Commands\TransactionDiscard',
+
             /* publish - subscribe */
-            'subscribe'                 => '\Predis\Commands\Subscribe',
-            'unsubscribe'               => '\Predis\Commands\Unsubscribe',
-            'psubscribe'                => '\Predis\Commands\SubscribeByPattern',
-            'punsubscribe'              => '\Predis\Commands\UnsubscribeByPattern',
-            'publish'                   => '\Predis\Commands\Publish',
+            'subscribe'                 => '\Predis\Commands\PubSubSubscribe',
+            'unsubscribe'               => '\Predis\Commands\PubSubUnsubscribe',
+            'psubscribe'                => '\Predis\Commands\PubSubSubscribeByPattern',
+            'punsubscribe'              => '\Predis\Commands\PubSubUnsubscribeByPattern',
+            'publish'                   => '\Predis\Commands\PubSubPublish',
 
             /* remote server control commands */
-            'config'                    => '\Predis\Commands\Config',
+            'config'                    => '\Predis\Commands\ServerConfig',
         );
     }
 }

+ 67 - 75
lib/Predis/Profiles/ServerVersion22.php

@@ -8,39 +8,32 @@ class ServerVersion22 extends ServerProfile {
         return array(
             /* ---------------- Redis 1.2 ---------------- */
 
-            /* miscellaneous commands */
-            'ping'                      => '\Predis\Commands\Ping',
-            'echo'                      => '\Predis\Commands\DoEcho',
-            'auth'                      => '\Predis\Commands\Auth',
-
-            /* connection handling */
-            'quit'                      => '\Predis\Commands\Quit',
+            /* commands operating on the key space */
+            'exists'                    => '\Predis\Commands\KeyExists',
+            'del'                       => '\Predis\Commands\KeyDelete',
+            'type'                      => '\Predis\Commands\KeyType',
+            'keys'                      => '\Predis\Commands\KeyKeys',
+            'randomkey'                 => '\Predis\Commands\KeyRandom',
+            'rename'                    => '\Predis\Commands\KeyRename',
+            'renamenx'                  => '\Predis\Commands\KeyRenamePreserve',
+            'expire'                    => '\Predis\Commands\KeyExpire',
+            'expireat'                  => '\Predis\Commands\KeyExpireAt',
+            'ttl'                       => '\Predis\Commands\KeyTimeToLive',
+            'move'                      => '\Predis\Commands\KeyMove',
+            'sort'                      => '\Predis\Commands\KeySort',
 
             /* commands operating on string values */
-            'set'                       => '\Predis\Commands\Set',
-            'setnx'                     => '\Predis\Commands\SetPreserve',
-            'mset'                      => '\Predis\Commands\SetMultiple',
-            'msetnx'                    => '\Predis\Commands\SetMultiplePreserve',
-            'get'                       => '\Predis\Commands\Get',
-            'mget'                      => '\Predis\Commands\GetMultiple',
-            'getset'                    => '\Predis\Commands\GetSet',
-            'incr'                      => '\Predis\Commands\Increment',
-            'incrby'                    => '\Predis\Commands\IncrementBy',
-            'decr'                      => '\Predis\Commands\Decrement',
-            'decrby'                    => '\Predis\Commands\DecrementBy',
-            'exists'                    => '\Predis\Commands\Exists',
-            'del'                       => '\Predis\Commands\Delete',
-            'type'                      => '\Predis\Commands\Type',
-
-            /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys',
-            'randomkey'                 => '\Predis\Commands\RandomKey',
-            'rename'                    => '\Predis\Commands\Rename',
-            'renamenx'                  => '\Predis\Commands\RenamePreserve',
-            'expire'                    => '\Predis\Commands\Expire',
-            'expireat'                  => '\Predis\Commands\ExpireAt',
-            'dbsize'                    => '\Predis\Commands\DatabaseSize',
-            'ttl'                       => '\Predis\Commands\TimeToLive',
+            'set'                       => '\Predis\Commands\StringSet',
+            'setnx'                     => '\Predis\Commands\StringSetPreserve',
+            'mset'                      => '\Predis\Commands\StringSetMultiple',
+            'msetnx'                    => '\Predis\Commands\StringSetMultiplePreserve',
+            'get'                       => '\Predis\Commands\StringGet',
+            'mget'                      => '\Predis\Commands\StringGetMultiple',
+            'getset'                    => '\Predis\Commands\StringGetSet',
+            'incr'                      => '\Predis\Commands\StringIncrement',
+            'incrby'                    => '\Predis\Commands\StringIncrementBy',
+            'decr'                      => '\Predis\Commands\StringDecrement',
+            'decrby'                    => '\Predis\Commands\StringDecrementBy',
 
             /* commands operating on lists */
             'rpush'                     => '\Predis\Commands\ListPushTail',
@@ -82,39 +75,33 @@ class ServerVersion22 extends ServerProfile {
             'zscore'                    => '\Predis\Commands\ZSetScore',
             'zremrangebyscore'          => '\Predis\Commands\ZSetRemoveRangeByScore',
 
-            /* multiple databases handling commands */
-            'select'                    => '\Predis\Commands\SelectDatabase',
-            'move'                      => '\Predis\Commands\MoveKey',
-            'flushdb'                   => '\Predis\Commands\FlushDatabase',
-            'flushall'                  => '\Predis\Commands\FlushAll',
-
-            /* sorting */
-            'sort'                      => '\Predis\Commands\Sort',
+            /* connection related commands */
+            'ping'                      => '\Predis\Commands\ConnectionPing',
+            'auth'                      => '\Predis\Commands\ConnectionAuth',
+            'select'                    => '\Predis\Commands\ConnectionSelect',
+            'echo'                      => '\Predis\Commands\ConnectionEcho',
+            'quit'                      => '\Predis\Commands\ConnectionQuit',
 
             /* remote server control commands */
-            'info'                      => '\Predis\Commands\Info',
-            'slaveof'                   => '\Predis\Commands\SlaveOf',
-            'monitor'                   => '\Predis\Commands\Monitor',
-
-            /* persistence control commands */
-            'save'                      => '\Predis\Commands\Save',
-            'bgsave'                    => '\Predis\Commands\BackgroundSave',
-            'lastsave'                  => '\Predis\Commands\LastSave',
-            'shutdown'                  => '\Predis\Commands\Shutdown',
-            'bgrewriteaof'              => '\Predis\Commands\BackgroundRewriteAppendOnlyFile',
+            'info'                      => '\Predis\Commands\ServerInfo',
+            'slaveof'                   => '\Predis\Commands\ServerSlaveOf',
+            'monitor'                   => '\Predis\Commands\ServerMonitor',
+            'dbsize'                    => '\Predis\Commands\ServerDatabaseSize',
+            'flushdb'                   => '\Predis\Commands\ServerFlushDatabase',
+            'flushall'                  => '\Predis\Commands\ServerFlushAll',
+            'save'                      => '\Predis\Commands\ServerSave',
+            'bgsave'                    => '\Predis\Commands\ServerBackgroundSave',
+            'lastsave'                  => '\Predis\Commands\ServerLastSave',
+            'shutdown'                  => '\Predis\Commands\ServerShutdown',
+            'bgrewriteaof'              => '\Predis\Commands\ServerBackgroundRewriteAOF',
 
 
             /* ---------------- Redis 2.0 ---------------- */
 
-            /* transactions */
-            'multi'                     => '\Predis\Commands\Multi',
-            'exec'                      => '\Predis\Commands\Exec',
-            'discard'                   => '\Predis\Commands\Discard',
-
             /* commands operating on string values */
-            'setex'                     => '\Predis\Commands\SetExpire',
-            'append'                    => '\Predis\Commands\Append',
-            'substr'                    => '\Predis\Commands\Substr',
+            'setex'                     => '\Predis\Commands\StringSetExpire',
+            'append'                    => '\Predis\Commands\StringAppend',
+            'substr'                    => '\Predis\Commands\StringSubstr',
 
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
@@ -142,32 +129,33 @@ class ServerVersion22 extends ServerProfile {
             'hvals'                     => '\Predis\Commands\HashValues',
             'hgetall'                   => '\Predis\Commands\HashGetAll',
 
+            /* transactions */
+            'multi'                     => '\Predis\Commands\TransactionMulti',
+            'exec'                      => '\Predis\Commands\TransactionExec',
+            'discard'                   => '\Predis\Commands\TransactionDiscard',
+
             /* publish - subscribe */
-            'subscribe'                 => '\Predis\Commands\Subscribe',
-            'unsubscribe'               => '\Predis\Commands\Unsubscribe',
-            'psubscribe'                => '\Predis\Commands\SubscribeByPattern',
-            'punsubscribe'              => '\Predis\Commands\UnsubscribeByPattern',
-            'publish'                   => '\Predis\Commands\Publish',
+            'subscribe'                 => '\Predis\Commands\PubSubSubscribe',
+            'unsubscribe'               => '\Predis\Commands\PubSubUnsubscribe',
+            'psubscribe'                => '\Predis\Commands\PubSubSubscribeByPattern',
+            'punsubscribe'              => '\Predis\Commands\PubSubUnsubscribeByPattern',
+            'publish'                   => '\Predis\Commands\PubSubPublish',
 
             /* remote server control commands */
-            'config'                    => '\Predis\Commands\Config',
+            'config'                    => '\Predis\Commands\ServerConfig',
 
 
             /* ---------------- Redis 2.2 ---------------- */
 
-            /* transactions */
-            'watch'                     => '\Predis\Commands\Watch',
-            'unwatch'                   => '\Predis\Commands\Unwatch',
+            /* commands operating on the key space */
+            'persist'                   => '\Predis\Commands\KeyPersist',
 
             /* commands operating on string values */
-            'strlen'                    => '\Predis\Commands\Strlen',
-            'setrange'                  => '\Predis\Commands\SetRange',
-            'getrange'                  => '\Predis\Commands\GetRange',
-            'setbit'                    => '\Predis\Commands\SetBit',
-            'getbit'                    => '\Predis\Commands\GetBit',
-
-            /* commands operating on the key space */
-            'persist'                   => '\Predis\Commands\Persist',
+            'strlen'                    => '\Predis\Commands\StringStrlen',
+            'setrange'                  => '\Predis\Commands\StringSetRange',
+            'getrange'                  => '\Predis\Commands\StringGetRange',
+            'setbit'                    => '\Predis\Commands\StringSetBit',
+            'getbit'                    => '\Predis\Commands\StringGetBit',
 
             /* commands operating on lists */
             'rpushx'                    => '\Predis\Commands\ListPushTailX',
@@ -178,8 +166,12 @@ class ServerVersion22 extends ServerProfile {
             /* commands operating on sorted sets */
             'zrevrangebyscore'          => '\Predis\Commands\ZSetReverseRangeByScore',
 
+            /* transactions */
+            'watch'                     => '\Predis\Commands\TransactionWatch',
+            'unwatch'                   => '\Predis\Commands\TransactionUnwatch',
+
             /* remote server control commands */
-            'object'                => '\Predis\Commands\DebugObject',
+            'object'                    => '\Predis\Commands\ServerObject',
         );
     }
 }

+ 2 - 2
lib/Predis/Profiles/ServerVersionNext.php

@@ -18,8 +18,8 @@ class ServerVersionNext extends ServerVersion22 {
             'hdel'                      => '\Predis\Commands\HashDeleteV24x',
 
             /* remote server control commands */
-            'info'                      => '\Predis\Commands\InfoV24x',
-            'client'                    => '\Predis\Commands\Client',
+            'info'                      => '\Predis\Commands\ServerInfoV24x',
+            'client'                    => '\Predis\Commands\ServerClient',
         ));
     }
 }

+ 8 - 8
test/ClientFeaturesTest.php

@@ -64,28 +64,28 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
     function testCommand_TestArguments() {
         $cmdArgs = array('key1', 'key2', 'key3');
 
-        $cmd = new \Predis\Commands\GetMultiple();
+        $cmd = new \Predis\Commands\StringGetMultiple();
         $cmd->setArguments($cmdArgs);
         $this->assertEquals($cmdArgs[0], $cmd->getArgument(0));
         $this->assertEquals($cmdArgs[1], $cmd->getArgument(1));
         $this->assertEquals($cmdArgs[2], $cmd->getArgument(2));
 
-        $cmd = new \Predis\Commands\Ping();
+        $cmd = new \Predis\Commands\ConnectionPing();
         $this->assertNull($cmd->getArgument(0));
     }
 
     function testCommand_ParseResponse() {
         // default parser
-        $cmd = new \Predis\Commands\Get();
+        $cmd = new \Predis\Commands\StringGet();
         $this->assertEquals('test', $cmd->parseResponse('test'));
 
         // overridden parser (boolean)
-        $cmd = new \Predis\Commands\Exists();
+        $cmd = new \Predis\Commands\KeyExists();
         $this->assertTrue($cmd->parseResponse('1'));
         $this->assertFalse($cmd->parseResponse('0'));
 
         // overridden parser (boolean)
-        $cmd = new \Predis\Commands\Ping();
+        $cmd = new \Predis\Commands\ConnectionPing();
         $this->assertTrue($cmd->parseResponse('PONG'));
 
         // overridden parser (complex)
@@ -122,12 +122,12 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
         $profile = \Predis\Profiles\ServerProfile::get('2.0');
 
         $cmdNoArgs = $profile->createCommand('info');
-        $this->assertInstanceOf('\Predis\Commands\Info', $cmdNoArgs);
+        $this->assertInstanceOf('\Predis\Commands\ServerInfo', $cmdNoArgs);
         $this->assertNull($cmdNoArgs->getArgument());
 
         $args = array('key1', 'key2');
         $cmdWithArgs = $profile->createCommand('mget', $args);
-        $this->assertInstanceOf('\Predis\Commands\GetMultiple', $cmdWithArgs);
+        $this->assertInstanceOf('\Predis\Commands\StringGetMultiple', $cmdWithArgs);
         $this->assertEquals($args[0], $cmdWithArgs->getArgument()); // TODO: why?
         $this->assertEquals($args[0], $cmdWithArgs->getArgument(0));
         $this->assertEquals($args[1], $cmdWithArgs->getArgument(1));
@@ -144,7 +144,7 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
     function testServerProfile_CommandsRegistration() {
         $profile  = \Predis\Profiles\ServerProfile::get('1.2');
         $cmdId    = 'multi';
-        $cmdClass = '\Predis\Commands\Multi';
+        $cmdClass = '\Predis\Commands\TransactionMulti';
 
         $this->assertFalse($profile->supportsCommand($cmdId));
         $profile->defineCommand($cmdId, new $cmdClass());