ServerVersion12.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. namespace Predis\Profiles;
  3. class ServerVersion12 extends ServerProfile {
  4. public function getVersion() { return '1.2'; }
  5. public function getSupportedCommands() {
  6. return array(
  7. /* ---------------- Redis 1.2 ---------------- */
  8. /* miscellaneous commands */
  9. 'ping' => '\Predis\Commands\Ping',
  10. 'echo' => '\Predis\Commands\DoEcho',
  11. 'auth' => '\Predis\Commands\Auth',
  12. /* connection handling */
  13. 'quit' => '\Predis\Commands\Quit',
  14. /* commands operating on string values */
  15. 'set' => '\Predis\Commands\Set',
  16. 'setnx' => '\Predis\Commands\SetPreserve',
  17. 'mset' => '\Predis\Commands\SetMultiple',
  18. 'msetnx' => '\Predis\Commands\SetMultiplePreserve',
  19. 'get' => '\Predis\Commands\Get',
  20. 'mget' => '\Predis\Commands\GetMultiple',
  21. 'getset' => '\Predis\Commands\GetSet',
  22. 'incr' => '\Predis\Commands\Increment',
  23. 'incrby' => '\Predis\Commands\IncrementBy',
  24. 'decr' => '\Predis\Commands\Decrement',
  25. 'decrby' => '\Predis\Commands\DecrementBy',
  26. 'exists' => '\Predis\Commands\Exists',
  27. 'del' => '\Predis\Commands\Delete',
  28. 'type' => '\Predis\Commands\Type',
  29. /* commands operating on the key space */
  30. 'keys' => '\Predis\Commands\KeysV12x',
  31. 'randomkey' => '\Predis\Commands\RandomKey',
  32. 'rename' => '\Predis\Commands\Rename',
  33. 'renamenx' => '\Predis\Commands\RenamePreserve',
  34. 'expire' => '\Predis\Commands\Expire',
  35. 'expireat' => '\Predis\Commands\ExpireAt',
  36. 'dbsize' => '\Predis\Commands\DatabaseSize',
  37. 'ttl' => '\Predis\Commands\TimeToLive',
  38. /* commands operating on lists */
  39. 'rpush' => '\Predis\Commands\ListPushTail',
  40. 'lpush' => '\Predis\Commands\ListPushHead',
  41. 'llen' => '\Predis\Commands\ListLength',
  42. 'lrange' => '\Predis\Commands\ListRange',
  43. 'ltrim' => '\Predis\Commands\ListTrim',
  44. 'lindex' => '\Predis\Commands\ListIndex',
  45. 'lset' => '\Predis\Commands\ListSet',
  46. 'lrem' => '\Predis\Commands\ListRemove',
  47. 'lpop' => '\Predis\Commands\ListPopFirst',
  48. 'rpop' => '\Predis\Commands\ListPopLast',
  49. 'rpoplpush' => '\Predis\Commands\ListPopLastPushHead',
  50. /* commands operating on sets */
  51. 'sadd' => '\Predis\Commands\SetAdd',
  52. 'srem' => '\Predis\Commands\SetRemove',
  53. 'spop' => '\Predis\Commands\SetPop',
  54. 'smove' => '\Predis\Commands\SetMove',
  55. 'scard' => '\Predis\Commands\SetCardinality',
  56. 'sismember' => '\Predis\Commands\SetIsMember',
  57. 'sinter' => '\Predis\Commands\SetIntersection',
  58. 'sinterstore' => '\Predis\Commands\SetIntersectionStore',
  59. 'sunion' => '\Predis\Commands\SetUnion',
  60. 'sunionstore' => '\Predis\Commands\SetUnionStore',
  61. 'sdiff' => '\Predis\Commands\SetDifference',
  62. 'sdiffstore' => '\Predis\Commands\SetDifferenceStore',
  63. 'smembers' => '\Predis\Commands\SetMembers',
  64. 'srandmember' => '\Predis\Commands\SetRandomMember',
  65. /* commands operating on sorted sets */
  66. 'zadd' => '\Predis\Commands\ZSetAdd',
  67. 'zincrby' => '\Predis\Commands\ZSetIncrementBy',
  68. 'zrem' => '\Predis\Commands\ZSetRemove',
  69. 'zrange' => '\Predis\Commands\ZSetRange',
  70. 'zrevrange' => '\Predis\Commands\ZSetReverseRange',
  71. 'zrangebyscore' => '\Predis\Commands\ZSetRangeByScore',
  72. 'zcard' => '\Predis\Commands\ZSetCardinality',
  73. 'zscore' => '\Predis\Commands\ZSetScore',
  74. 'zremrangebyscore' => '\Predis\Commands\ZSetRemoveRangeByScore',
  75. /* multiple databases handling commands */
  76. 'select' => '\Predis\Commands\SelectDatabase',
  77. 'move' => '\Predis\Commands\MoveKey',
  78. 'flushdb' => '\Predis\Commands\FlushDatabase',
  79. 'flushall' => '\Predis\Commands\FlushAll',
  80. /* sorting */
  81. 'sort' => '\Predis\Commands\Sort',
  82. /* remote server control commands */
  83. 'info' => '\Predis\Commands\Info',
  84. 'slaveof' => '\Predis\Commands\SlaveOf',
  85. 'monitor' => '\Predis\Commands\Monitor',
  86. /* persistence control commands */
  87. 'save' => '\Predis\Commands\Save',
  88. 'bgsave' => '\Predis\Commands\BackgroundSave',
  89. 'lastsave' => '\Predis\Commands\LastSave',
  90. 'shutdown' => '\Predis\Commands\Shutdown',
  91. 'bgrewriteaof' => '\Predis\Commands\BackgroundRewriteAppendOnlyFile',
  92. );
  93. }
  94. }