123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308 |
- <?php
- class Memcached {
-
- const OPT_COMPRESSION = -1001;
- const OPT_COMPRESSION_TYPE = -1004;
-
- const OPT_PREFIX_KEY = -1002;
-
- const OPT_SERIALIZER = -1003;
-
- const HAVE_IGBINARY = 0;
-
- const HAVE_JSON = 0;
- const HAVE_SESSION = 1;
- const HAVE_SASL = 0;
-
- const OPT_HASH = 2;
-
- const HASH_DEFAULT = 0;
-
- const HASH_MD5 = 1;
-
- const HASH_CRC = 2;
-
- const HASH_FNV1_64 = 3;
-
- const HASH_FNV1A_64 = 4;
-
- const HASH_FNV1_32 = 5;
-
- const HASH_FNV1A_32 = 6;
-
- const HASH_HSIEH = 7;
-
- const HASH_MURMUR = 8;
-
- const OPT_DISTRIBUTION = 9;
-
- const DISTRIBUTION_MODULA = 0;
-
- const DISTRIBUTION_CONSISTENT = 1;
- const DISTRIBUTION_VIRTUAL_BUCKET = 6;
-
- const OPT_LIBKETAMA_COMPATIBLE = 16;
- const OPT_LIBKETAMA_HASH = 17;
- const OPT_TCP_KEEPALIVE = 32;
-
- const OPT_BUFFER_WRITES = 10;
-
- const OPT_BINARY_PROTOCOL = 18;
-
- const OPT_NO_BLOCK = 0;
-
- const OPT_TCP_NODELAY = 1;
-
- const OPT_SOCKET_SEND_SIZE = 4;
-
- const OPT_SOCKET_RECV_SIZE = 5;
-
- const OPT_CONNECT_TIMEOUT = 14;
-
- const OPT_RETRY_TIMEOUT = 15;
-
- const OPT_SEND_TIMEOUT = 19;
-
- const OPT_RECV_TIMEOUT = 20;
-
- const OPT_POLL_TIMEOUT = 8;
-
- const OPT_CACHE_LOOKUPS = 6;
-
- const OPT_SERVER_FAILURE_LIMIT = 21;
- const OPT_AUTO_EJECT_HOSTS = 28;
- const OPT_HASH_WITH_PREFIX_KEY = 25;
- const OPT_NOREPLY = 26;
- const OPT_SORT_HOSTS = 12;
- const OPT_VERIFY_KEY = 13;
- const OPT_USE_UDP = 27;
- const OPT_NUMBER_OF_REPLICAS = 29;
- const OPT_RANDOMIZE_REPLICA_READ = 30;
- const OPT_CORK = 31;
- const OPT_REMOVE_FAILED_SERVERS = 35;
- const OPT_DEAD_TIMEOUT = 36;
- const OPT_SERVER_TIMEOUT_LIMIT = 37;
- const OPT_MAX = 38;
- const OPT_IO_BYTES_WATERMARK = 23;
- const OPT_IO_KEY_PREFETCH = 24;
- const OPT_IO_MSG_WATERMARK = 22;
- const OPT_LOAD_FROM_FILE = 34;
- const OPT_SUPPORT_CAS = 7;
- const OPT_TCP_KEEPIDLE = 33;
- const OPT_USER_DATA = 11;
-
- const RES_SUCCESS = 0;
-
- const RES_FAILURE = 1;
-
- const RES_HOST_LOOKUP_FAILURE = 2;
-
- const RES_UNKNOWN_READ_FAILURE = 7;
-
- const RES_PROTOCOL_ERROR = 8;
-
- const RES_CLIENT_ERROR = 9;
-
- const RES_SERVER_ERROR = 10;
-
- const RES_WRITE_FAILURE = 5;
-
- const RES_DATA_EXISTS = 12;
-
- const RES_NOTSTORED = 14;
-
- const RES_NOTFOUND = 16;
-
- const RES_PARTIAL_READ = 18;
-
- const RES_SOME_ERRORS = 19;
-
- const RES_NO_SERVERS = 20;
-
- const RES_END = 21;
-
- const RES_ERRNO = 26;
-
- const RES_BUFFERED = 32;
-
- const RES_TIMEOUT = 31;
-
- const RES_BAD_KEY_PROVIDED = 33;
- const RES_STORED = 15;
- const RES_DELETED = 22;
- const RES_STAT = 24;
- const RES_ITEM = 25;
- const RES_NOT_SUPPORTED = 28;
- const RES_FETCH_NOTFINISHED = 30;
- const RES_SERVER_MARKED_DEAD = 35;
- const RES_UNKNOWN_STAT_KEY = 36;
- const RES_INVALID_HOST_PROTOCOL = 34;
- const RES_MEMORY_ALLOCATION_FAILURE = 17;
- const RES_E2BIG = 37;
- const RES_KEY_TOO_BIG = 39;
- const RES_SERVER_TEMPORARILY_DISABLED = 47;
- const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48;
- const RES_AUTH_PROBLEM = 40;
- const RES_AUTH_FAILURE = 41;
- const RES_AUTH_CONTINUE = 42;
- const RES_CONNECTION_FAILURE = 3;
- const RES_CONNECTION_BIND_FAILURE = 4;
- const RES_READ_FAILURE = 6;
- const RES_DATA_DOES_NOT_EXIST = 13;
- const RES_VALUE = 23;
- const RES_FAIL_UNIX_SOCKET = 27;
- const RES_NO_KEY_PROVIDED = 29;
- const RES_INVALID_ARGUMENTS = 38;
- const RES_PARSE_ERROR = 43;
- const RES_PARSE_USER_ERROR = 44;
- const RES_DEPRECATED = 45;
- const RES_IN_PROGRESS = 46;
- const RES_MAXIMUM_RETURN = 49;
-
- const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11;
-
- const RES_PAYLOAD_FAILURE = -1001;
-
- const SERIALIZER_PHP = 1;
-
- const SERIALIZER_IGBINARY = 2;
-
- const SERIALIZER_JSON = 3;
- const SERIALIZER_JSON_ARRAY = 4;
- const COMPRESSION_FASTLZ = 2;
- const COMPRESSION_ZLIB = 1;
-
- const GET_PRESERVE_ORDER = 1;
- const GET_ERROR_RETURN_VALUE = false;
-
- public function __construct ($persistent_id = '', $on_new_object_cb = null) {}
-
- public function getResultCode () {}
-
- public function getResultMessage () {}
-
- public function get ($key, callable $cache_cb = null, $flags = 0) {}
-
- public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {}
-
- public function getMulti (array $keys, $flags = null) {}
-
- public function getMultiByKey ($server_key, array $keys, $flags = 0) {}
-
- public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {}
-
- public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {}
-
- public function fetch () {}
-
- public function fetchAll () {}
-
- public function set ($key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function touch ($key, $expiration = 0) {}
-
- public function touchByKey ($server_key, $key, $expiration) {}
-
- public function setMulti (array $items, $expiration = 0, $udf_flags = 0) {}
-
- public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {}
-
- public function cas ($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function casByKey ($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function add ($key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
-
- public function append ($key, $value) {}
-
- public function appendByKey ($server_key, $key, $value) {}
-
- public function prepend ($key, $value) {}
-
- public function prependByKey ($server_key, $key, $value) {}
-
- public function replace ($key, $value, $expiration = null, $udf_flags = 0) {}
-
- public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {}
-
- public function delete ($key, $time = 0) {}
-
- public function deleteMulti (array $keys, $time = 0) {}
-
- public function deleteByKey ($server_key, $key, $time = 0) {}
-
- public function deleteMultiByKey ($server_key, array $keys, $time = 0) {}
-
- public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- public function addServer ($host, $port, $weight = 0) {}
-
- public function addServers (array $servers) {}
-
- public function getServerList () {}
-
- public function getServerByKey ($server_key) {}
-
- public function resetServerList () {}
-
- public function quit () {}
-
- public function getStats ($type = null) {}
-
- public function getVersion () {}
-
- public function getAllKeys () {}
-
- public function flush ($delay = 0) {}
-
- public function getOption ($option) {}
-
- public function setOption ($option, $value) {}
-
- public function setOptions (array $options) {}
-
- public function setSaslAuthData (string $username , string $password) {}
-
- public function isPersistent () {}
-
- public function isPristine () {}
- public function flushBuffers () {}
- public function setEncodingKey ( $key ) {}
- public function getLastDisconnectedServer () {}
- public function getLastErrorErrno () {}
- public function getLastErrorCode () {}
- public function getLastErrorMessage () {}
- public function setBucket (array $host_map, array $forward_map, $replicas) {}
- }
- class MemcachedException extends RuntimeException {
- }
- ?>
|