From 1d8068ecb070fdc360d750e0c1f3f15796e61ec0 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 4 Aug 2023 13:44:36 +0100 Subject: [PATCH] Sync docs with Memcached stubs (#1849) * Sync docs with Memcached stubs See: https://github.com/php-memcached-dev/php-memcached * Run gen_stub.php --replace-classsynopses --- reference/memcached/memcached.xml | 13 +++++----- reference/memcached/memcached/add.xml | 6 ++--- reference/memcached/memcached/addbykey.xml | 6 ++--- reference/memcached/memcached/addserver.xml | 4 +-- reference/memcached/memcached/addservers.xml | 4 +-- reference/memcached/memcached/append.xml | 17 ++++++++----- reference/memcached/memcached/appendbykey.xml | 17 ++++++++----- reference/memcached/memcached/cas.xml | 8 +++--- reference/memcached/memcached/casbykey.xml | 8 +++--- reference/memcached/memcached/construct.xml | 25 ++++++++++++++++--- reference/memcached/memcached/decrement.xml | 4 +-- .../memcached/memcached/decrementbykey.xml | 4 +-- reference/memcached/memcached/delete.xml | 4 +-- reference/memcached/memcached/deletebykey.xml | 4 +-- reference/memcached/memcached/deletemulti.xml | 4 +-- .../memcached/memcached/deletemultibykey.xml | 6 ++--- reference/memcached/memcached/fetch.xml | 8 +++--- reference/memcached/memcached/fetchall.xml | 6 ++--- reference/memcached/memcached/flush.xml | 4 +-- reference/memcached/memcached/get.xml | 20 +++++++-------- reference/memcached/memcached/getallkeys.xml | 6 ++--- reference/memcached/memcached/getbykey.xml | 12 ++++----- reference/memcached/memcached/getdelayed.xml | 11 +++----- .../memcached/memcached/getdelayedbykey.xml | 8 +++--- reference/memcached/memcached/getmulti.xml | 14 +++++------ .../memcached/memcached/getmultibykey.xml | 8 +++--- reference/memcached/memcached/getoption.xml | 4 +-- .../memcached/memcached/getresultcode.xml | 6 ++--- .../memcached/memcached/getresultmessage.xml | 6 ++--- .../memcached/memcached/getserverbykey.xml | 9 +++---- .../memcached/memcached/getserverlist.xml | 6 ++--- reference/memcached/memcached/getstats.xml | 12 ++++----- reference/memcached/memcached/getversion.xml | 8 +++--- reference/memcached/memcached/increment.xml | 4 +-- .../memcached/memcached/incrementbykey.xml | 4 +-- .../memcached/memcached/ispersistent.xml | 6 ++--- reference/memcached/memcached/ispristine.xml | 6 ++--- reference/memcached/memcached/prepend.xml | 17 ++++++++----- .../memcached/memcached/prependbykey.xml | 17 ++++++++----- reference/memcached/memcached/quit.xml | 6 ++--- reference/memcached/memcached/replace.xml | 6 ++--- .../memcached/memcached/replacebykey.xml | 6 ++--- .../memcached/memcached/resetserverlist.xml | 6 ++--- reference/memcached/memcached/set.xml | 6 ++--- reference/memcached/memcached/setbykey.xml | 6 ++--- reference/memcached/memcached/setmulti.xml | 6 ++--- .../memcached/memcached/setmultibykey.xml | 6 ++--- reference/memcached/memcached/setoption.xml | 4 +-- reference/memcached/memcached/setoptions.xml | 4 +-- .../memcached/memcached/setsaslauthdata.xml | 12 ++++----- reference/memcached/memcached/touch.xml | 6 ++--- reference/memcached/memcached/touchbykey.xml | 6 ++--- 52 files changed, 179 insertions(+), 237 deletions(-) diff --git a/reference/memcached/memcached.xml b/reference/memcached/memcached.xml index 7b5ebedb122f..e87dca5ea516 100644 --- a/reference/memcached/memcached.xml +++ b/reference/memcached/memcached.xml @@ -1,6 +1,5 @@ - The Memcached class @@ -22,20 +21,21 @@ - Memcached + + Memcached + - Memcached - - + &Methods; + - + @@ -48,7 +48,6 @@ &reference.memcached.entities.memcached; - - Memcached::add @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::add stringkey mixedvalue - intexpiration + intexpiration0 Memcached::add is similar to @@ -75,7 +74,6 @@ - - Memcached::addByKey @@ -9,12 +8,12 @@ &reftitle.description; - + public boolMemcached::addByKey stringserver_key stringkey mixedvalue - intexpiration + intexpiration0 Memcached::addByKey is functionally equivalent to @@ -86,7 +85,6 @@ - - Memcached::addServer @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::addServer stringhost intport @@ -117,7 +116,6 @@ $m->addServer('mem2.domain.com', 11211, 67); - - Memcached::addServers @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::addServers arrayservers @@ -84,7 +83,6 @@ $m->addServers($servers); - - Memcached::append @@ -9,8 +8,8 @@ &reftitle.description; - - public boolMemcached::append + + public boolnullMemcached::append stringkey stringvalue @@ -58,8 +57,15 @@ &reftitle.returnvalues; &return.success; - The Memcached::getResultCode will return - Memcached::RES_NOTSTORED if the key does not exist. + Returns &null; when compression is on. + + + + + &reftitle.errors; + + Returns &null; and raises an E_WARNING when + compression is enabled. @@ -102,7 +108,6 @@ string(6) "abcdef" - - Memcached::appendByKey @@ -9,8 +8,8 @@ &reftitle.description; - - public boolMemcached::appendByKey + + public boolnullMemcached::appendByKey stringserver_key stringkey stringvalue @@ -59,8 +58,15 @@ &reftitle.returnvalues; &return.success; - The Memcached::getResultCode will return - Memcached::RES_NOTSTORED if the key does not exist. + Returns &null; when compression is on. + + + + + &reftitle.errors; + + Returns &null; and raises an E_WARNING when + compression is enabled. @@ -75,7 +81,6 @@ - - Memcached::cas @@ -9,12 +8,12 @@ &reftitle.description; - + public boolMemcached::cas - floatcas_token + stringintfloatcas_token stringkey mixedvalue - intexpiration + intexpiration0 Memcached::cas performs a "check and set" operation, @@ -122,7 +121,6 @@ do { - - Memcached::casByKey @@ -9,13 +8,13 @@ &reftitle.description; - + public boolMemcached::casByKey - floatcas_token + stringintfloatcas_token stringserver_key stringkey mixedvalue - intexpiration + intexpiration0 Memcached::casByKey is functionally equivalent to @@ -94,7 +93,6 @@ - - Memcached::__construct @@ -9,14 +8,17 @@ &reftitle.description; - + public Memcached::__construct - stringnullpersistent_idnull + stringnullpersistent_id&null; + callablenullcallback&null; + stringnullconnection_str&null; Creates a Memcached instance representing the connection to the memcache servers. + &warn.undocumented.func; @@ -35,6 +37,22 @@ + + callback + + + + + + + + connection_str + + + + + + @@ -64,7 +82,6 @@ $m3 = new Memcached('story_pool'); - - Memcached::decrement @@ -9,7 +8,7 @@ &reftitle.description; - + public intfalseMemcached::decrement stringkey intoffset1 @@ -125,7 +124,6 @@ bool(false) - - Memcached::decrementByKey @@ -9,7 +8,7 @@ &reftitle.description; - + public intfalseMemcached::decrementByKey stringserver_key stringkey @@ -94,7 +93,6 @@ - - Memcached::delete @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::delete stringkey inttime0 @@ -83,7 +82,6 @@ $m->delete('key1'); - - Memcached::deleteByKey @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::deleteByKey stringserver_key stringkey @@ -77,7 +76,6 @@ - - Memcached::deleteMulti @@ -9,7 +8,7 @@ &reftitle.description; - + public arrayMemcached::deleteMulti arraykeys inttime0 @@ -61,7 +60,6 @@ - - Memcached::deleteMultiByKey @@ -9,8 +8,8 @@ &reftitle.description; - - public boolMemcached::deleteMultiByKey + + public arrayMemcached::deleteMultiByKey stringserver_key arraykeys inttime0 @@ -74,7 +73,6 @@ - - Memcached::fetch @@ -9,9 +8,9 @@ &reftitle.description; - - public arrayMemcached::fetch - + + public arrayfalseMemcached::fetch + Memcached::fetch retrieves the next result from the @@ -96,7 +95,6 @@ array(3) { - - Memcached::fetchAll @@ -9,9 +8,9 @@ &reftitle.description; - + public arrayfalseMemcached::fetchAll - + Memcached::fetchAll retrieves all the remaining @@ -97,7 +96,6 @@ array(2) { - - Memcached::flush @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::flush intdelay0 @@ -69,7 +68,6 @@ $m->flush(10); - - Memcached::get @@ -9,19 +8,19 @@ &reftitle.description; - + public mixedMemcached::get stringkey - callablecache_cb - intflags + callablenullcache_cb&null; + intget_flags0 Memcached::get returns the item that was previously stored under the key. If the item is found and - the flags is given Memcached::GET_EXTENDED, + the get_flags is given Memcached::GET_EXTENDED, it will also return the CAS token value for the item. See - Memcached::cas for how to use CAS tokens. Read-through caching callback may be + Memcached::cas for how to use CAS tokens. + Read-through caching callback may be specified via cache_cb parameter. @@ -49,7 +48,7 @@ - flags + get_flags Flags to control the returned result. When Memcached::GET_EXTENDED @@ -65,7 +64,7 @@ &reftitle.returnvalues; Returns the value stored in the cache or &false; otherwise. - If the flags is set to Memcached::GET_EXTENDED, + If the get_flags is set to Memcached::GET_EXTENDED, an array containing the value and the CAS token is returned instead of only the value. The Memcached::getResultCode will return Memcached::RES_NOTFOUND if the key does not exist. @@ -87,7 +86,7 @@ PECL memcached 3.0.0 The cas_token parameter was removed. - Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. + Instead get_flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. @@ -154,7 +153,6 @@ if (!($ip = $m->get('ip_block'))) { - - Memcached::getAllKeys @@ -9,9 +8,9 @@ &reftitle.description; - + public arrayfalseMemcached::getAllKeys - + Memcached::getAllKeys queries each memcache server @@ -40,7 +39,6 @@ - - Memcached::getByKey @@ -9,12 +8,12 @@ &reftitle.description; - + public mixedMemcached::getByKey stringserver_key stringkey - callablecache_cb - intflags + callablenullcache_cb&null; + intget_flags0 Memcached::getByKey is functionally equivalent to @@ -53,7 +52,7 @@ - flags + get_flags Flags to control the returned result. When value of Memcached::GET_EXTENDED @@ -89,7 +88,7 @@ PECL memcached 3.0.0 The cas_token parameter was removed. - Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. + Instead get_flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. @@ -109,7 +108,6 @@ - - Memcached::getDelayed @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::getDelayed arraykeys - boolwith_cas - callablevalue_cb + boolwith_cas&false; + callablenullvalue_cb&null; Memcached::getDelayed issues a request to memcache for @@ -25,8 +24,7 @@ is true, the CAS token values will also be requested. - Instead of fetching the results explicitly, you can specify a result callback via + Instead of fetching the results explicitly, you can specify a result callback via value_cb parameter. @@ -137,7 +135,6 @@ array(2) { - - Memcached::getDelayedByKey @@ -9,12 +8,12 @@ &reftitle.description; - + public boolMemcached::getDelayedByKey stringserver_key arraykeys - boolwith_cas - callablevalue_cb + boolwith_cas&false; + callablenullvalue_cb&null; Memcached::getDelayedByKey is functionally equivalent to @@ -84,7 +83,6 @@ - - Memcached::getMulti @@ -9,10 +8,10 @@ &reftitle.description; - - public mixedMemcached::getMulti + + public arrayfalseMemcached::getMulti arraykeys - intflags + intget_flags0 Memcached::getMulti is similar to @@ -25,12 +24,12 @@ It was filled with the CAS token values for the found items. The cas_tokens parameter was removed in v3.0 of the extension. It was replaced with a new flag Memcached::GET_EXTENDED - that needs is to be used as the value for flags. + that needs is to be used as the value for get_flags. - The flags parameter can be used to specify + The get_flags parameter can be used to specify additional options for Memcached::getMulti. Memcached::GET_PRESERVE_ORDER ensures that the keys are returned in the same order as they were requested in. @@ -52,7 +51,7 @@ - flags + get_flags The flags for the get operation. @@ -278,7 +277,6 @@ zoo - - Memcached::getMultiByKey @@ -9,11 +8,11 @@ &reftitle.description; - + public arrayfalseMemcached::getMultiByKey stringserver_key arraykeys - intflags + intget_flags0 Memcached::getMultiByKey is functionally equivalent to @@ -44,7 +43,7 @@ - flags + get_flags The flags for the get operation. @@ -98,7 +97,6 @@ - - Memcached::getOption @@ -9,7 +8,7 @@ &reftitle.description; - + public mixedMemcached::getOption intoption @@ -82,7 +81,6 @@ int(1000) - - Memcached::getResultCode @@ -9,9 +8,9 @@ &reftitle.description; - + public intMemcached::getResultCode - + Memcached::getResultCode returns one of the @@ -55,7 +54,6 @@ if ($m->getResultCode() == Memcached::RES_NOTSTORED) { - - Memcached::getResultMessage @@ -9,9 +8,9 @@ &reftitle.description; - + public stringMemcached::getResultMessage - + Memcached::getResultMessage returns a string that @@ -59,7 +58,6 @@ NOT STORED - - Memcached::getServerByKey @@ -9,8 +8,8 @@ &reftitle.description; - - public arrayMemcached::getServerByKey + + public arrayfalseMemcached::getServerByKey stringserver_key @@ -40,8 +39,7 @@ &reftitle.returnvalues; Returns an array containing three keys of host, - port, and weight on success or &false; - on failure. + port, and weight on success&return.falseforfailure;. &memcached.result.getresultcode; @@ -103,7 +101,6 @@ array(3) { - - Memcached::getServerList @@ -9,9 +8,9 @@ &reftitle.description; - + public arrayMemcached::getServerList - + Memcached::getServerList returns the list of all @@ -78,7 +77,6 @@ array(2) { - - Memcached::getStats @@ -9,15 +8,15 @@ &reftitle.description; - + public arrayfalseMemcached::getStats - + stringnulltype&null; Memcached::getStats returns an array containing the - state of all available memcache servers. See memcache protocol specification - for details on these statistics. + state of all available memcache servers. See + memcache protocol + specification for details on these statistics. @@ -89,7 +88,6 @@ Array - - Memcached::getVersion @@ -9,9 +8,9 @@ &reftitle.description; - - public arrayMemcached::getVersion - + + public arrayfalseMemcached::getVersion + Memcached::getVersion returns an array containing the @@ -60,7 +59,6 @@ Array - - Memcached::increment @@ -9,7 +8,7 @@ &reftitle.description; - + public intfalseMemcached::increment stringkey intoffset1 @@ -118,7 +117,6 @@ bool(false) - - Memcached::incrementByKey @@ -9,7 +8,7 @@ &reftitle.description; - + public intfalseMemcached::incrementByKey stringserver_key stringkey @@ -93,7 +92,6 @@ - - Memcached::isPersistent @@ -9,9 +8,9 @@ &reftitle.description; - + public boolMemcached::isPersistent - + Memcached::isPersistent checks if the connections to @@ -42,7 +41,6 @@ - - Memcached::isPristine @@ -9,9 +8,9 @@ &reftitle.description; - + public boolMemcached::isPristine - + Memcached::isPristine checks if the Memcache instance @@ -41,7 +40,6 @@ - - Memcached::prepend @@ -9,8 +8,8 @@ &reftitle.description; - - public boolMemcached::prepend + + public boolnullMemcached::prepend stringkey stringvalue @@ -58,8 +57,15 @@ &reftitle.returnvalues; &return.success; - The Memcached::getResultCode will return - Memcached::RES_NOTSTORED if the key does not exist. + Returns &null; when compression is on. + + + + + &reftitle.errors; + + Returns &null; and raises an E_WARNING when + compression is enabled. @@ -102,7 +108,6 @@ string(6) "defabc" - - Memcached::prependByKey @@ -9,8 +8,8 @@ &reftitle.description; - - public boolMemcached::prependByKey + + public boolnullMemcached::prependByKey stringserver_key stringkey stringvalue @@ -59,8 +58,15 @@ &reftitle.returnvalues; &return.success; - The Memcached::getResultCode will return - Memcached::RES_NOTSTORED if the key does not exist. + Returns &null; when compression is on. + + + + + &reftitle.errors; + + Returns &null; and raises an E_WARNING when + compression is enabled. @@ -75,7 +81,6 @@ - - Memcached::quit @@ -9,9 +8,9 @@ &reftitle.description; - + public boolMemcached::quit - + Memcached::quit closes any open connections to the @@ -33,7 +32,6 @@ - - Memcached::replace @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::replace stringkey mixedvalue - intexpiration + intexpiration0 Memcached::replace is similar to @@ -75,7 +74,6 @@ - - Memcached::replaceByKey @@ -9,12 +8,12 @@ &reftitle.description; - + public boolMemcached::replaceByKey stringserver_key stringkey mixedvalue - intexpiration + intexpiration0 Memcached::replaceByKey is functionally equivalent to @@ -86,7 +85,6 @@ - - Memcached::resetServerList @@ -9,9 +8,9 @@ &reftitle.description; - + public boolMemcached::resetServerList - + Memcached::resetserverlist removes all memcache @@ -42,7 +41,6 @@ - - Memcached::set @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::set stringkey mixedvalue - intexpiration + intexpiration0 Memcached::set stores the value @@ -125,7 +124,6 @@ object(stdClass)#1 (0) { - - Memcached::setByKey @@ -9,12 +8,12 @@ &reftitle.description; - + public boolMemcached::setByKey stringserver_key stringkey mixedvalue - intexpiration + intexpiration0 Memcached::setByKey is functionally equivalent to @@ -104,7 +103,6 @@ $m->setByKey('api-cache', 'block-ip:169.127.127.202', 1); - - Memcached::setMulti @@ -9,10 +8,10 @@ &reftitle.description; - + public boolMemcached::setMulti arrayitems - intexpiration + intexpiration0 Memcached::setMulti is similar to @@ -90,7 +89,6 @@ $m->setMulti($items, time() + 300); - - Memcached::setMultiByKey @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::setMultiByKey stringserver_key arrayitems - intexpiration + intexpiration0 Memcached::setMultiByKey is functionally equivalent to @@ -75,7 +74,6 @@ - - Memcached::setOption @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::setOption intoption mixedvalue @@ -101,7 +100,6 @@ Prefix key is now: widgets - - Memcached::setOptions @@ -9,7 +8,7 @@ &reftitle.description; - + public boolMemcached::setOptions arrayoptions @@ -84,7 +83,6 @@ Prefix key is now: widgets - - Memcached::setSaslAuthData @@ -9,8 +8,8 @@ &reftitle.description; - - public voidMemcached::setSaslAuthData + + public boolMemcached::setSaslAuthData stringusername stringpassword @@ -21,8 +20,8 @@ This method is only available when the memcached extension is - built with SASL support. Please refer to Memcached setup for how to do this. + built with SASL support. Please refer to + Memcached setup for how to do this. @@ -53,12 +52,11 @@ &reftitle.returnvalues; - &return.void; + &return.success; - - Memcached::touch @@ -9,10 +8,10 @@ &reftitle.description; - + public boolMemcached::touch stringkey - intexpiration + intexpiration0 Memcached::touch sets a new expiration value on the given key. @@ -61,7 +60,6 @@ - - Memcached::touchByKey @@ -9,11 +8,11 @@ &reftitle.description; - + public boolMemcached::touchByKey stringserver_key stringkey - intexpiration + intexpiration0 Memcached::touchByKey is functionally equivalent to @@ -73,7 +72,6 @@ -