ServerVersion20.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace Predis\Profiles;
  3. class ServerVersion20 extends ServerVersion12 {
  4. public function getVersion() { return '2.0'; }
  5. public function getSupportedCommands() {
  6. return array_merge(parent::getSupportedCommands(), array(
  7. /* transactions */
  8. 'multi' => '\Predis\Commands\Multi',
  9. 'exec' => '\Predis\Commands\Exec',
  10. 'discard' => '\Predis\Commands\Discard',
  11. /* commands operating on string values */
  12. 'setex' => '\Predis\Commands\SetExpire',
  13. 'append' => '\Predis\Commands\Append',
  14. 'substr' => '\Predis\Commands\Substr',
  15. /* commands operating on the key space */
  16. 'keys' => '\Predis\Commands\Keys',
  17. /* commands operating on lists */
  18. 'blpop' => '\Predis\Commands\ListPopFirstBlocking',
  19. 'brpop' => '\Predis\Commands\ListPopLastBlocking',
  20. /* commands operating on sorted sets */
  21. 'zunionstore' => '\Predis\Commands\ZSetUnionStore',
  22. 'zinterstore' => '\Predis\Commands\ZSetIntersectionStore',
  23. 'zcount' => '\Predis\Commands\ZSetCount',
  24. 'zrank' => '\Predis\Commands\ZSetRank',
  25. 'zrevrank' => '\Predis\Commands\ZSetReverseRank',
  26. 'zremrangebyrank' => '\Predis\Commands\ZSetRemoveRangeByRank',
  27. /* commands operating on hashes */
  28. 'hset' => '\Predis\Commands\HashSet',
  29. 'hsetnx' => '\Predis\Commands\HashSetPreserve',
  30. 'hmset' => '\Predis\Commands\HashSetMultiple',
  31. 'hincrby' => '\Predis\Commands\HashIncrementBy',
  32. 'hget' => '\Predis\Commands\HashGet',
  33. 'hmget' => '\Predis\Commands\HashGetMultiple',
  34. 'hdel' => '\Predis\Commands\HashDelete',
  35. 'hexists' => '\Predis\Commands\HashExists',
  36. 'hlen' => '\Predis\Commands\HashLength',
  37. 'hkeys' => '\Predis\Commands\HashKeys',
  38. 'hvals' => '\Predis\Commands\HashValues',
  39. 'hgetall' => '\Predis\Commands\HashGetAll',
  40. /* publish - subscribe */
  41. 'subscribe' => '\Predis\Commands\Subscribe',
  42. 'unsubscribe' => '\Predis\Commands\Unsubscribe',
  43. 'psubscribe' => '\Predis\Commands\SubscribeByPattern',
  44. 'punsubscribe' => '\Predis\Commands\UnsubscribeByPattern',
  45. 'publish' => '\Predis\Commands\Publish',
  46. /* remote server control commands */
  47. 'config' => '\Predis\Commands\Config',
  48. ));
  49. }
  50. }