@@ -10,13 +10,13 @@ class Memcached {
1010 */
1111
1212 const OPT_HASH ;
13-
14- const OPT_HASH_DEFAULT ;
13+
14+ const HASH_DEFAULT ;
1515
1616 const HASH_MD5 ;
1717
1818 const HASH_CRC ;
19-
19+
2020 const HASH_FNV1_64 ;
2121
2222 const HASH_FNV1A_64 ;
@@ -34,12 +34,16 @@ class Memcached {
3434 const DISTRIBUTION_MODULA ;
3535
3636 const DISTRIBUTION_CONSISTENT ;
37-
37+
3838 const DISTRIBUTION_VIRTUAL_BUCKET ;
3939
40- const LIBKETAMA_COMPATIBLE ;
40+ const OPT_LIBKETAMA_COMPATIBLE ;
4141
42- const OPT_BUFFER_REQUESTS ;
42+ const OPT_LIBKETAMA_HASH ;
43+
44+ const OPT_TCP_KEEPALIVE ;
45+
46+ const OPT_BUFFER_WRITES ;
4347
4448 const OPT_BINARY_PROTOCOL ;
4549
@@ -57,9 +61,9 @@ class Memcached {
5761
5862 const OPT_DEAD_TIMEOUT ;
5963
60- const OPT_SND_TIMEOUT ;
64+ const OPT_SEND_TIMEOUT ;
6165
62- const OPT_RCV_TIMEOUT ;
66+ const OPT_RECV_TIMEOUT ;
6367
6468 const OPT_POLL_TIMEOUT ;
6569
@@ -71,22 +75,34 @@ class Memcached {
7175
7276 const OPT_AUTO_EJECT_HOSTS ;
7377
74- const OPT_NUMBER_OF_REPLICAS ;
75-
7678 const OPT_NOREPLY ;
7779
7880 const OPT_VERIFY_KEY ;
79-
81+
82+ const OPT_USE_UDP ;
83+
84+ const OPT_NUMBER_OF_REPLICAS ;
85+
8086 const OPT_RANDOMIZE_REPLICA_READS ;
8187
88+ const OPT_REMOVE_FAILED_SERVERS ;
8289
8390 /**
84- * Class parameters
91+ * Supported serializers
8592 */
8693 const HAVE_JSON ;
8794
8895 const HAVE_IGBINARY ;
8996
97+ const HAVE_MSGPACK ;
98+
99+ /**
100+ * Feature support
101+ */
102+ const HAVE_SESSION ;
103+
104+ const HAVE_SASL ;
105+
90106 /**
91107 * Class options.
92108 */
@@ -107,18 +123,24 @@ class Memcached {
107123
108124 const SERIALIZER_JSON_ARRAY ;
109125
126+ const SERIALIZER_MSGPACK ;
127+
110128 /**
111129 * Compression types
112130 */
113- const COMPRESSION_TYPE_FASTLZ ;
131+ const COMPRESSION_FASTLZ ;
114132
115- const COMPRESSION_TYPE_ZLIB ;
133+ const COMPRESSION_ZLIB ;
116134
117135 /**
118- * Flags
136+ * Flags for get and getMulti operations.
119137 */
138+ // Whether to preserve key order in the result
120139 const GET_PRESERVE_ORDER ;
121140
141+ // Whether to fetch CAS token as well (use "gets").
142+ const GET_EXTENDED ;
143+
122144 /**
123145 * Return values
124146 */
@@ -186,9 +208,57 @@ class Memcached {
186208
187209 const RES_CONNECTION_SOCKET_CREATE_FAILURE ;
188210
211+ const RES_E2BIG ;
212+
213+ const RES_KEY_TOO_BIG ;
214+
215+ const RES_SERVER_TEMPORARILY_DISABLED ;
216+
217+ const RES_SERVER_MEMORY_ALLOCATION_FAILURE ;
218+
219+ const RES_AUTH_PROBLEM ;
220+
221+ const RES_AUTH_FAILURE ;
222+
223+ const RES_AUTH_CONTINUE ;
224+
225+ /** Server callbacks, if compiled with --memcached-protocol */
226+ const ON_CONNECT ;
227+ const ON_ADD ;
228+ const ON_APPEND ;
229+ const ON_DECREMENT ;
230+ const ON_DELETE ;
231+ const ON_FLUSH ;
232+ const ON_GET ;
233+ const ON_INCREMENT ;
234+ const ON_NOOP ;
235+ const ON_PREPEND ;
236+ const ON_QUIT ;
237+ const ON_REPLACE ;
238+ const ON_SET ;
239+ const ON_STAT ;
240+ const ON_VERSION ;
241+ /** Constants used when compiled with --memcached-protocol */
242+ const RESPONSE_SUCCESS ;
243+ const RESPONSE_KEY_ENOENT ;
244+ const RESPONSE_KEY_EEXISTS ;
245+ const RESPONSE_E2BIG ;
246+ const RESPONSE_EINVAL ;
247+ const RESPONSE_NOT_STORED ;
248+ const RESPONSE_DELTA_BADVAL ;
249+ const RESPONSE_NOT_MY_VBUCKET ;
250+ const RESPONSE_AUTH_ERROR ;
251+ const RESPONSE_AUTH_CONTINUE ;
252+ const RESPONSE_UNKNOWN_COMMAND ;
253+ const RESPONSE_ENOMEM ;
254+ const RESPONSE_NOT_SUPPORTED ;
255+ const RESPONSE_EINTERNAL ;
256+ const RESPONSE_EBUSY ;
257+ const RESPONSE_ETMPFAIL ;
258+
189259
190260 public function __construct( $ persistent_id = '' , $ on_new_object_cb = null ) {}
191-
261+
192262 public function get ( $ key , callable $ cache_cb = null , $ flags = 0 ) {}
193263
194264 public function getByKey ( $ server_key , $ key , callable $ cache_cb = null , $ flags = 0 ) {}
@@ -202,7 +272,7 @@ public function getDelayed( array $keys, $with_cas = null, $value_cb = null ) {}
202272 public function getDelayedByKey ( $ server_key , array $ keys , $ with_cas = null , $ value_cb = null ) {}
203273
204274 public function fetch ( ) {}
205-
275+
206276 public function fetchAll ( ) {}
207277
208278 public function set ( $ key , $ value , $ expiration = 0 , $ udf_flags = 0 ) {}
@@ -250,7 +320,7 @@ public function increment( $key, $offset = 1, $initial_value = 0, $expiry = 0) {
250320 public function decrement ( $ key , $ offset = 1 , $ initial_value = 0 , $ expiry = 0 ) {}
251321
252322 public function getOption ( $ option ) {}
253-
323+
254324 public function setOption ( $ option , $ value ) {}
255325
256326 public function setOptions ( array $ options ) {}
@@ -280,7 +350,7 @@ public function flushBuffers( ) {}
280350 public function getStats ( $ type = null ) {}
281351
282352 public function getAllKeys ( ) {}
283-
353+
284354 public function getVersion ( ) {}
285355
286356 public function getResultCode ( ) {}
0 commit comments