PageRenderTime 24ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/foody.blogtamsudev.vn/vendor/predis/predis/src/ClientInterface.php

https://gitlab.com/ntphuc/BackendFeedy
PHP | 230 lines | 17 code | 11 blank | 202 comment | 0 complexity | 468c404fadd5db679bb87543dc14f60c MD5 | raw file
  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;
  11. use Predis\Command\CommandInterface;
  12. use Predis\Configuration\OptionsInterface;
  13. use Predis\Connection\ConnectionInterface;
  14. use Predis\Profile\ProfileInterface;
  15. /**
  16. * Interface defining a client able to execute commands against Redis.
  17. *
  18. * All the commands exposed by the client generally have the same signature as
  19. * described by the Redis documentation, but some of them offer an additional
  20. * and more friendly interface to ease programming which is described in the
  21. * following list of methods:
  22. *
  23. * @method int del(array $keys)
  24. * @method string dump($key)
  25. * @method int exists($key)
  26. * @method int expire($key, $seconds)
  27. * @method int expireat($key, $timestamp)
  28. * @method array keys($pattern)
  29. * @method int move($key, $db)
  30. * @method mixed object($subcommand, $key)
  31. * @method int persist($key)
  32. * @method int pexpire($key, $milliseconds)
  33. * @method int pexpireat($key, $timestamp)
  34. * @method int pttl($key)
  35. * @method string randomkey()
  36. * @method mixed rename($key, $target)
  37. * @method int renamenx($key, $target)
  38. * @method array scan($cursor, array $options = null)
  39. * @method array sort($key, array $options = null)
  40. * @method int ttl($key)
  41. * @method mixed type($key)
  42. * @method int append($key, $value)
  43. * @method int bitcount($key, $start = null, $end = null)
  44. * @method int bitop($operation, $destkey, $key)
  45. * @method int decr($key)
  46. * @method int decrby($key, $decrement)
  47. * @method string get($key)
  48. * @method int getbit($key, $offset)
  49. * @method string getrange($key, $start, $end)
  50. * @method string getset($key, $value)
  51. * @method int incr($key)
  52. * @method int incrby($key, $increment)
  53. * @method string incrbyfloat($key, $increment)
  54. * @method array mget(array $keys)
  55. * @method mixed mset(array $dictionary)
  56. * @method int msetnx(array $dictionary)
  57. * @method mixed psetex($key, $milliseconds, $value)
  58. * @method mixed set($key, $value, $expireResolution = null, $expireTTL = null, $flag = null)
  59. * @method int setbit($key, $offset, $value)
  60. * @method int setex($key, $seconds, $value)
  61. * @method int setnx($key, $value)
  62. * @method int setrange($key, $offset, $value)
  63. * @method int strlen($key)
  64. * @method int hdel($key, array $fields)
  65. * @method int hexists($key, $field)
  66. * @method string hget($key, $field)
  67. * @method array hgetall($key)
  68. * @method int hincrby($key, $field, $increment)
  69. * @method string hincrbyfloat($key, $field, $increment)
  70. * @method array hkeys($key)
  71. * @method int hlen($key)
  72. * @method array hmget($key, array $fields)
  73. * @method mixed hmset($key, array $dictionary)
  74. * @method array hscan($key, $cursor, array $options = null)
  75. * @method int hset($key, $field, $value)
  76. * @method int hsetnx($key, $field, $value)
  77. * @method array hvals($key)
  78. * @method array blpop(array $keys, $timeout)
  79. * @method array brpop(array $keys, $timeout)
  80. * @method array brpoplpush($source, $destination, $timeout)
  81. * @method string lindex($key, $index)
  82. * @method int linsert($key, $whence, $pivot, $value)
  83. * @method int llen($key)
  84. * @method string lpop($key)
  85. * @method int lpush($key, array $values)
  86. * @method int lpushx($key, $value)
  87. * @method array lrange($key, $start, $stop)
  88. * @method int lrem($key, $count, $value)
  89. * @method mixed lset($key, $index, $value)
  90. * @method mixed ltrim($key, $start, $stop)
  91. * @method string rpop($key)
  92. * @method string rpoplpush($source, $destination)
  93. * @method int rpush($key, array $values)
  94. * @method int rpushx($key, $value)
  95. * @method int sadd($key, array $members)
  96. * @method int scard($key)
  97. * @method array sdiff(array $keys)
  98. * @method int sdiffstore($destination, array $keys)
  99. * @method array sinter(array $keys)
  100. * @method int sinterstore($destination, array $keys)
  101. * @method int sismember($key, $member)
  102. * @method array smembers($key)
  103. * @method int smove($source, $destination, $member)
  104. * @method string spop($key)
  105. * @method string srandmember($key, $count = null)
  106. * @method int srem($key, $member)
  107. * @method array sscan($key, $cursor, array $options = null)
  108. * @method array sunion(array $keys)
  109. * @method int sunionstore($destination, array $keys)
  110. * @method int zadd($key, array $membersAndScoresDictionary)
  111. * @method int zcard($key)
  112. * @method string zcount($key, $min, $max)
  113. * @method string zincrby($key, $increment, $member)
  114. * @method int zinterstore($destination, array $keys, array $options = null)
  115. * @method array zrange($key, $start, $stop, array $options = null)
  116. * @method array zrangebyscore($key, $min, $max, array $options = null)
  117. * @method int zrank($key, $member)
  118. * @method int zrem($key, $member)
  119. * @method int zremrangebyrank($key, $start, $stop)
  120. * @method int zremrangebyscore($key, $min, $max)
  121. * @method array zrevrange($key, $start, $stop, array $options = null)
  122. * @method array zrevrangebyscore($key, $min, $max, array $options = null)
  123. * @method int zrevrank($key, $member)
  124. * @method int zunionstore($destination, array $keys, array $options = null)
  125. * @method string zscore($key, $member)
  126. * @method array zscan($key, $cursor, array $options = null)
  127. * @method array zrangebylex($key, $start, $stop, array $options = null)
  128. * @method int zremrangebylex($key, $min, $max)
  129. * @method int zlexcount($key, $min, $max)
  130. * @method int pfadd($key, array $elements)
  131. * @method mixed pfmerge($destinationKey, array $sourceKeys)
  132. * @method int pfcount(array $keys)
  133. * @method mixed pubsub($subcommand, $argument)
  134. * @method int publish($channel, $message)
  135. * @method mixed discard()
  136. * @method array exec()
  137. * @method mixed multi()
  138. * @method mixed unwatch()
  139. * @method mixed watch($key)
  140. * @method mixed eval($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
  141. * @method mixed evalsha($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
  142. * @method mixed script($subcommand, $argument = null)
  143. * @method mixed auth($password)
  144. * @method string echo($message)
  145. * @method mixed ping($message = null)
  146. * @method mixed select($database)
  147. * @method mixed bgrewriteaof()
  148. * @method mixed bgsave()
  149. * @method mixed client($subcommand, $argument = null)
  150. * @method mixed config($subcommand, $argument = null)
  151. * @method int dbsize()
  152. * @method mixed flushall()
  153. * @method mixed flushdb()
  154. * @method array info($section = null)
  155. * @method int lastsave()
  156. * @method mixed save()
  157. * @method mixed slaveof($host, $port)
  158. * @method mixed slowlog($subcommand, $argument = null)
  159. * @method array time()
  160. * @method array command()
  161. *
  162. * @author Daniele Alessandri <suppakilla@gmail.com>
  163. */
  164. interface ClientInterface
  165. {
  166. /**
  167. * Returns the server profile used by the client.
  168. *
  169. * @return ProfileInterface
  170. */
  171. public function getProfile();
  172. /**
  173. * Returns the client options specified upon initialization.
  174. *
  175. * @return OptionsInterface
  176. */
  177. public function getOptions();
  178. /**
  179. * Opens the underlying connection to the server.
  180. */
  181. public function connect();
  182. /**
  183. * Closes the underlying connection from the server.
  184. */
  185. public function disconnect();
  186. /**
  187. * Returns the underlying connection instance.
  188. *
  189. * @return ConnectionInterface
  190. */
  191. public function getConnection();
  192. /**
  193. * Creates a new instance of the specified Redis command.
  194. *
  195. * @param string $method Command ID.
  196. * @param array $arguments Arguments for the command.
  197. *
  198. * @return CommandInterface
  199. */
  200. public function createCommand($method, $arguments = array());
  201. /**
  202. * Executes the specified Redis command.
  203. *
  204. * @param CommandInterface $command Command instance.
  205. *
  206. * @return mixed
  207. */
  208. public function executeCommand(CommandInterface $command);
  209. /**
  210. * Creates a Redis command with the specified arguments and sends a request
  211. * to the server.
  212. *
  213. * @param string $method Command ID.
  214. * @param array $arguments Arguments for the command.
  215. *
  216. * @return mixed
  217. */
  218. public function __call($method, $arguments);
  219. }