You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
4.5 KiB

  1. <?php
  2. /**
  3. *
  4. *
  5. * @copyright NetMonsters <team@netmonsters.ru>
  6. * @link http://netmonsters.ru
  7. * @package Majestic
  8. * @subpackage Redis
  9. * @since 2011-05-17
  10. */
  11. /**
  12. * Redis stub for https://github.com/nicolasff/phpredis
  13. * @author aterekhov
  14. * @see https://github.com/nicolasff/phpredis
  15. *
  16. * @method bool connect() connect(string $host, int $port = 6379, float $timeout = 0) Connect to redis
  17. * @method bool pconnect() connect(string $host, int $port = 6379, float $timeout = 0, string $persistent_id) Connect to redis with reusing connection
  18. * @method void close() Close connection to redis
  19. * @method bool setOption() setOption(mixed $name, mixed $value) Set client option
  20. * @method mixed getOption() getOption(mixed $name) Get client option
  21. * @method string ping() ping() Check the current connection status
  22. * @method string|bool get() get(string $key) Get the value related to the specified key
  23. * @method bool set() set(string $key, mixed $value, int $timeout = null) Set the string value in argument as value of the key
  24. * @method bool setex() setex(string $key, int $ttl, mixed $value) Set the string value in argument as value of the key, with a time to live
  25. * @method bool setnx() setnx(string $key, int $ttl) Set the string value in argument as value of the key if the key doesn't already exist in the database
  26. * @method float delete() delete(mixed $key) Remove specified keys
  27. * @method Redis multi() multi(mixed $mode = 1) Enter and exit transactional mode
  28. * @method bool exec() exec() Enter and exit transactional mode
  29. * @method void watch() watch(mixed $keys) Watches a key for modifications by another client
  30. * @method void unwatch() unwatch(mixed $keys) Watches a key for modifications by another client
  31. * @method void subscribe() subscribe(array $channels, mixed $callback) Subscribe to channels. Warning: this function will probably change in the future
  32. * @method void publish() publish(string $channel, string $message) Publish messages to channels. Warning: this function will probably change in the future
  33. * @method bool exists() exists(string $key) Verify if the specified key exists
  34. * @method int incr() incr(string $key) Increment the number stored at key by one
  35. * @method int incrBy() incrBy(string $key, int $value) Increment the number stored at key by $value
  36. *
  37. * @method bool expire() expire(string $key, int $ttl) Sets an expiration date (a timeout) on an item
  38. *
  39. * @method float zAdd() zAdd(string $key, float $score, string $value) Adds the specified member with a given score to the sorted set stored at key
  40. * @method array zRange() zRange(string $key, float $start, float $end, bool $with_scores = false) Returns a range of elements from the ordered set stored at the specified key, with values in the range [start, end]
  41. * @method float zDelete() zDelete(string $key, string $value) Deletes a specified member from the ordered set.
  42. * @method array zRevRange() zRevRange(string $key, float $start, float $end, bool $with_scores = false) Returns a range of elements from the ordered set stored at the specified key, with values in the range [start, end]
  43. * @method array zRangeByScore() zRangeByScore(string $key, float $start, float $end) Returns the elements of the sorted set stored at the specified key which have scores in the range [start,end]. Adding a parenthesis before start or end excludes it from the range. +inf and -inf are also valid limits. zRevRangeByScore returns the same items in reverse order, when the start and end parameters are swapped.
  44. * @method int zRemRangeByScore() zRemRangeByScore(string $key, float $start, float $end) Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].
  45. * @method int zRemRangeByRank() zRemRangeByRank(string $key, int $start, int $end) Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end].
  46. * @method float zCard() zCard(string $key) Returns the cardinality of an ordered set
  47. * @method float zScore() zScore(string $key, string $value) Returns the score of a given member in the specified sorted set.
  48. * @method float zUnionStore() zUnionStore(string $destination, array $keys, array $weights = array(), string $aggregate = 'sum') Creates an union of sorted sets given in second argument and store in in first argument
  49. * @method float zInterStore() zInterStore(string $destination, array $keys, array $weights = array(), string $aggregate = 'sum') Creates an intersection of sorted sets given in second argument and store in in first argument
  50. */
  51. class Redis
  52. {
  53. }