add deps
[pharext/pharext.org] / deps / memcached.api.php
1 <?php
2
3 namespace
4 {
5
6 class Memcached
7 {
8 const LIBMEMCACHED_VERSION_HEX = 16777240;
9 const OPT_COMPRESSION = -1001;
10 const OPT_COMPRESSION_TYPE = -1004;
11 const OPT_PREFIX_KEY = -1002;
12 const OPT_SERIALIZER = -1003;
13 const OPT_STORE_RETRY_COUNT = -1005;
14 const HAVE_IGBINARY = 0;
15 const HAVE_JSON = 0;
16 const HAVE_MSGPACK = 0;
17 const HAVE_SESSION = 1;
18 const HAVE_SASL = 1;
19 const OPT_HASH = 2;
20 const HASH_DEFAULT = 0;
21 const HASH_MD5 = 1;
22 const HASH_CRC = 2;
23 const HASH_FNV1_64 = 3;
24 const HASH_FNV1A_64 = 4;
25 const HASH_FNV1_32 = 5;
26 const HASH_FNV1A_32 = 6;
27 const HASH_HSIEH = 7;
28 const HASH_MURMUR = 8;
29 const OPT_DISTRIBUTION = 9;
30 const DISTRIBUTION_MODULA = 0;
31 const DISTRIBUTION_CONSISTENT = 1;
32 const DISTRIBUTION_VIRTUAL_BUCKET = 6;
33 const OPT_LIBKETAMA_COMPATIBLE = 16;
34 const OPT_LIBKETAMA_HASH = 17;
35 const OPT_TCP_KEEPALIVE = 32;
36 const OPT_BUFFER_WRITES = 10;
37 const OPT_BINARY_PROTOCOL = 18;
38 const OPT_NO_BLOCK = 0;
39 const OPT_TCP_NODELAY = 1;
40 const OPT_SOCKET_SEND_SIZE = 4;
41 const OPT_SOCKET_RECV_SIZE = 5;
42 const OPT_CONNECT_TIMEOUT = 14;
43 const OPT_RETRY_TIMEOUT = 15;
44 const OPT_DEAD_TIMEOUT = 36;
45 const OPT_SEND_TIMEOUT = 19;
46 const OPT_RECV_TIMEOUT = 20;
47 const OPT_POLL_TIMEOUT = 8;
48 const OPT_CACHE_LOOKUPS = 6;
49 const OPT_SERVER_FAILURE_LIMIT = 21;
50 const OPT_AUTO_EJECT_HOSTS = 28;
51 const OPT_HASH_WITH_PREFIX_KEY = 25;
52 const OPT_NOREPLY = 26;
53 const OPT_SORT_HOSTS = 12;
54 const OPT_VERIFY_KEY = 13;
55 const OPT_USE_UDP = 27;
56 const OPT_NUMBER_OF_REPLICAS = 29;
57 const OPT_RANDOMIZE_REPLICA_READ = 30;
58 const OPT_REMOVE_FAILED_SERVERS = 35;
59 const OPT_SERVER_TIMEOUT_LIMIT = 37;
60 const RES_SUCCESS = 0;
61 const RES_FAILURE = 1;
62 const RES_HOST_LOOKUP_FAILURE = 2;
63 const RES_UNKNOWN_READ_FAILURE = 7;
64 const RES_PROTOCOL_ERROR = 8;
65 const RES_CLIENT_ERROR = 9;
66 const RES_SERVER_ERROR = 10;
67 const RES_WRITE_FAILURE = 5;
68 const RES_DATA_EXISTS = 12;
69 const RES_NOTSTORED = 14;
70 const RES_NOTFOUND = 16;
71 const RES_PARTIAL_READ = 18;
72 const RES_SOME_ERRORS = 19;
73 const RES_NO_SERVERS = 20;
74 const RES_END = 21;
75 const RES_ERRNO = 26;
76 const RES_BUFFERED = 32;
77 const RES_TIMEOUT = 31;
78 const RES_BAD_KEY_PROVIDED = 33;
79 const RES_STORED = 15;
80 const RES_DELETED = 22;
81 const RES_STAT = 24;
82 const RES_ITEM = 25;
83 const RES_NOT_SUPPORTED = 28;
84 const RES_FETCH_NOTFINISHED = 30;
85 const RES_SERVER_MARKED_DEAD = 35;
86 const RES_UNKNOWN_STAT_KEY = 36;
87 const RES_INVALID_HOST_PROTOCOL = 34;
88 const RES_MEMORY_ALLOCATION_FAILURE = 17;
89 const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11;
90 const RES_E2BIG = 37;
91 const RES_KEY_TOO_BIG = 39;
92 const RES_SERVER_TEMPORARILY_DISABLED = 47;
93 const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48;
94 const RES_AUTH_PROBLEM = 40;
95 const RES_AUTH_FAILURE = 41;
96 const RES_AUTH_CONTINUE = 42;
97 const RES_PAYLOAD_FAILURE = -1001;
98 const SERIALIZER_PHP = 1;
99 const SERIALIZER_IGBINARY = 2;
100 const SERIALIZER_JSON = 3;
101 const SERIALIZER_JSON_ARRAY = 4;
102 const SERIALIZER_MSGPACK = 5;
103 const COMPRESSION_FASTLZ = 2;
104 const COMPRESSION_ZLIB = 1;
105 const GET_PRESERVE_ORDER = 1;
106 const GET_ERROR_RETURN_VALUE = false;
107
108 public function __construct($persistent_id = NULL, $callback = NULL) {
109 }
110
111 public function getResultCode() {
112 }
113
114 public function getResultMessage() {
115 }
116
117 public function get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) {
118 }
119
120 public function getByKey($server_key, $key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) {
121 }
122
123 public function getMulti(array $keys, &$cas_tokens = NULL, $flags = NULL, &$udf_flags = NULL) {
124 }
125
126 public function getMultiByKey($server_key, array $keys, &$cas_tokens = NULL, $flags = NULL, &$udf_flags = NULL) {
127 }
128
129 public function getDelayed(array $keys, $with_cas = NULL, $value_cb = NULL) {
130 }
131
132 public function getDelayedByKey($server_key, array $keys, $with_cas = NULL, $value_cb = NULL) {
133 }
134
135 public function fetch() {
136 }
137
138 public function fetchAll() {
139 }
140
141 public function set($key, $value, $expiration = NULL, $udf_flags = NULL) {
142 }
143
144 public function setByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
145 }
146
147 public function touch($key, $expiration) {
148 }
149
150 public function touchByKey($server_key, $key, $expiration) {
151 }
152
153 public function setMulti(array $items, $expiration = NULL, $udf_flags = NULL) {
154 }
155
156 public function setMultiByKey($server_key, array $items, $expiration = NULL, $udf_flags = NULL) {
157 }
158
159 public function cas($cas_token, $key, $value, $expiration = NULL, $udf_flags = NULL) {
160 }
161
162 public function casByKey($cas_token, $server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
163 }
164
165 public function add($key, $value, $expiration = NULL, $udf_flags = NULL) {
166 }
167
168 public function addByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
169 }
170
171 public function append($key, $value, $expiration = NULL) {
172 }
173
174 public function appendByKey($server_key, $key, $value, $expiration = NULL) {
175 }
176
177 public function prepend($key, $value, $expiration = NULL) {
178 }
179
180 public function prependByKey($server_key, $key, $value, $expiration = NULL) {
181 }
182
183 public function replace($key, $value, $expiration = NULL, $udf_flags = NULL) {
184 }
185
186 public function replaceByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
187 }
188
189 public function delete($key, $time = NULL) {
190 }
191
192 public function deleteMulti($keys, $time = NULL) {
193 }
194
195 public function deleteByKey($server_key, $key, $time = NULL) {
196 }
197
198 public function deleteMultiByKey($server_key, $keys, $time = NULL) {
199 }
200
201 public function increment($key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
202 }
203
204 public function decrement($key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
205 }
206
207 public function incrementByKey($server_key, $key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
208 }
209
210 public function decrementByKey($server_key, $key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
211 }
212
213 public function addServer($host, $port, $weight = NULL) {
214 }
215
216 public function addServers(array $servers) {
217 }
218
219 public function getServerList() {
220 }
221
222 public function getServerByKey($server_key) {
223 }
224
225 public function resetServerList() {
226 }
227
228 public function quit() {
229 }
230
231 public function flushBuffers() {
232 }
233
234 public function getLastErrorMessage() {
235 }
236
237 public function getLastErrorCode() {
238 }
239
240 public function getLastErrorErrno() {
241 }
242
243 public function getLastDisconnectedServer() {
244 }
245
246 public function getStats() {
247 }
248
249 public function getVersion() {
250 }
251
252 public function getAllKeys() {
253 }
254
255 public function flush($delay = NULL) {
256 }
257
258 public function getOption($option) {
259 }
260
261 public function setOption($option, $value) {
262 }
263
264 public function setOptions($options) {
265 }
266
267 public function setBucket($host_map, $forward_map, $replicas) {
268 }
269
270 public function setSaslAuthData($username, $password) {
271 }
272
273 public function isPersistent() {
274 }
275
276 public function isPristine() {
277 }
278
279 }
280
281 class MemcachedException extends \RuntimeException
282 {
283 }
284 }
285