ServerVersion12.php 5.9 KB

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