RedisVersion120.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /*
  3. * This file is part of the Predis package.
  4. *
  5. * (c) Daniele Alessandri <suppakilla@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Predis\Profile;
  11. /**
  12. * Server profile for Redis 1.2.
  13. *
  14. * @author Daniele Alessandri <suppakilla@gmail.com>
  15. */
  16. class RedisVersion120 extends RedisProfile
  17. {
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function getVersion()
  22. {
  23. return '1.2';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function getSupportedCommands()
  29. {
  30. return array(
  31. /* ---------------- Redis 1.2 ---------------- */
  32. /* commands operating on the key space */
  33. 'EXISTS' => 'Predis\Command\KeyExists',
  34. 'DEL' => 'Predis\Command\KeyDelete',
  35. 'TYPE' => 'Predis\Command\KeyType',
  36. 'KEYS' => 'Predis\Command\KeyKeysV12x',
  37. 'RANDOMKEY' => 'Predis\Command\KeyRandom',
  38. 'RENAME' => 'Predis\Command\KeyRename',
  39. 'RENAMENX' => 'Predis\Command\KeyRenamePreserve',
  40. 'EXPIRE' => 'Predis\Command\KeyExpire',
  41. 'EXPIREAT' => 'Predis\Command\KeyExpireAt',
  42. 'TTL' => 'Predis\Command\KeyTimeToLive',
  43. 'MOVE' => 'Predis\Command\KeyMove',
  44. 'SORT' => 'Predis\Command\KeySort',
  45. /* commands operating on string values */
  46. 'SET' => 'Predis\Command\StringSet',
  47. 'SETNX' => 'Predis\Command\StringSetPreserve',
  48. 'MSET' => 'Predis\Command\StringSetMultiple',
  49. 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve',
  50. 'GET' => 'Predis\Command\StringGet',
  51. 'MGET' => 'Predis\Command\StringGetMultiple',
  52. 'GETSET' => 'Predis\Command\StringGetSet',
  53. 'INCR' => 'Predis\Command\StringIncrement',
  54. 'INCRBY' => 'Predis\Command\StringIncrementBy',
  55. 'DECR' => 'Predis\Command\StringDecrement',
  56. 'DECRBY' => 'Predis\Command\StringDecrementBy',
  57. /* commands operating on lists */
  58. 'RPUSH' => 'Predis\Command\ListPushTail',
  59. 'LPUSH' => 'Predis\Command\ListPushHead',
  60. 'LLEN' => 'Predis\Command\ListLength',
  61. 'LRANGE' => 'Predis\Command\ListRange',
  62. 'LTRIM' => 'Predis\Command\ListTrim',
  63. 'LINDEX' => 'Predis\Command\ListIndex',
  64. 'LSET' => 'Predis\Command\ListSet',
  65. 'LREM' => 'Predis\Command\ListRemove',
  66. 'LPOP' => 'Predis\Command\ListPopFirst',
  67. 'RPOP' => 'Predis\Command\ListPopLast',
  68. 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead',
  69. /* commands operating on sets */
  70. 'SADD' => 'Predis\Command\SetAdd',
  71. 'SREM' => 'Predis\Command\SetRemove',
  72. 'SPOP' => 'Predis\Command\SetPop',
  73. 'SMOVE' => 'Predis\Command\SetMove',
  74. 'SCARD' => 'Predis\Command\SetCardinality',
  75. 'SISMEMBER' => 'Predis\Command\SetIsMember',
  76. 'SINTER' => 'Predis\Command\SetIntersection',
  77. 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore',
  78. 'SUNION' => 'Predis\Command\SetUnion',
  79. 'SUNIONSTORE' => 'Predis\Command\SetUnionStore',
  80. 'SDIFF' => 'Predis\Command\SetDifference',
  81. 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore',
  82. 'SMEMBERS' => 'Predis\Command\SetMembers',
  83. 'SRANDMEMBER' => 'Predis\Command\SetRandomMember',
  84. /* commands operating on sorted sets */
  85. 'ZADD' => 'Predis\Command\ZSetAdd',
  86. 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy',
  87. 'ZREM' => 'Predis\Command\ZSetRemove',
  88. 'ZRANGE' => 'Predis\Command\ZSetRange',
  89. 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange',
  90. 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore',
  91. 'ZCARD' => 'Predis\Command\ZSetCardinality',
  92. 'ZSCORE' => 'Predis\Command\ZSetScore',
  93. 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore',
  94. /* connection related commands */
  95. 'PING' => 'Predis\Command\ConnectionPing',
  96. 'AUTH' => 'Predis\Command\ConnectionAuth',
  97. 'SELECT' => 'Predis\Command\ConnectionSelect',
  98. 'ECHO' => 'Predis\Command\ConnectionEcho',
  99. 'QUIT' => 'Predis\Command\ConnectionQuit',
  100. /* remote server control commands */
  101. 'INFO' => 'Predis\Command\ServerInfo',
  102. 'SLAVEOF' => 'Predis\Command\ServerSlaveOf',
  103. 'MONITOR' => 'Predis\Command\ServerMonitor',
  104. 'DBSIZE' => 'Predis\Command\ServerDatabaseSize',
  105. 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase',
  106. 'FLUSHALL' => 'Predis\Command\ServerFlushAll',
  107. 'SAVE' => 'Predis\Command\ServerSave',
  108. 'BGSAVE' => 'Predis\Command\ServerBackgroundSave',
  109. 'LASTSAVE' => 'Predis\Command\ServerLastSave',
  110. 'SHUTDOWN' => 'Predis\Command\ServerShutdown',
  111. 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF',
  112. );
  113. }
  114. }