diff --git a/psalm.xml b/psalm.xml index 0c1de8a54e3cf09ac4974c7fabf7873cef904922..0550fb9bd1fdf042a6dd62af22fde82edf45da41 100644 --- a/psalm.xml +++ b/psalm.xml @@ -99,9 +99,9 @@ </issueHandlers> <stubs> - <file name="tests/Utils/Stubs/krb5.php" /> - <file name="tests/Utils/Stubs/memcache.php" /> - <file name="tests/Utils/Stubs/memcached.php" /> - <file name="tests/Utils/Stubs/predis.php" /> + <file name="vendor/simplesamlphp/simplesamlphp-test-framework/stubs/krb5.php" /> + <file name="vendor/simplesamlphp/simplesamlphp-test-framework/stubs/memcache.php" /> + <file name="vendor/simplesamlphp/simplesamlphp-test-framework/stubs/memcached.php" /> + <file name="vendor/simplesamlphp/simplesamlphp-test-framework/stubs/predis.php" /> </stubs> </psalm> diff --git a/tests/Utils/Stubs/krb5.php b/tests/Utils/Stubs/krb5.php deleted file mode 100644 index 14e86b309e0e0ce6b3bb282b8700bba10968a9fb..0000000000000000000000000000000000000000 --- a/tests/Utils/Stubs/krb5.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -class KRB5NegotiateAuth -{ - /** - * @param string $keytab - * @param string $spn - */ - public function __construct($keytab, $spn) - { - } - - - /** - * @return bool - */ - public function doAuthentication() - { - } - - - /** - * @return string - */ - public function getAuthenticatedUser() - { - } - - - /** - * @param KRB5CCache $ccache - * @return void - */ - public function getDelegatedCredentials(KRB5CCache $ccache) - { - } -} - - -class KRB5CCache -{ - /** - * - */ - public function __construct() - { - } - - - /** - * @return string - */ - public function getName() - { - } - - - /** - * @param string $src - * @return bool - */ - public function open($src) - { - } - - - /** - * @param string $dest - * @return bool - */ - public function save($dest) - { - } - - - /** - * @param string $principal - * @param string $pass - * @param array|null $options - * @return bool - */ - public function initPassword($principal, $pass, $options = null) - { - } - - - /** - * @param string $principal - * @param string $keytab_file - * @param array|null $options - * @return bool - */ - public function initKeytab($principal, $keytab_file, $options = null) - { - } - - - /** - * @return string - */ - public function getPrincipal() - { - } - - - /** - * @return string - */ - public function getRealm() - { - } - - - /** - * @return array - */ - public function getLifetime() - { - } - - - /** - * @return array - */ - public function getEntries() - { - } - - - /** - * @param int $timeRemain - * @return bool - */ - public function isValid($timeRemain = 0) - { - } - - - /** - * @param string|null $prefix - * @return array - */ - public function getTktAttrs($prefix = null) - { - } - - - /** - * @return bool - */ - public function renew() - { - } - - - /** - * @param string $principal - * @param string $oldpass - * @param string $newpass - * @return bool - */ - public function changePassword($principal, $oldpass, $newpass) - { - } - - - /** - * @return array - */ - public function getExpirationTime() - { - } -} diff --git a/tests/Utils/Stubs/memcache.php b/tests/Utils/Stubs/memcache.php deleted file mode 100644 index 25459190ebb8a3f0d20f7bb57310a1e6c558361b..0000000000000000000000000000000000000000 --- a/tests/Utils/Stubs/memcache.php +++ /dev/null @@ -1,458 +0,0 @@ -<?php - -// Start of memcache v.3.0.8 - -class MemcachePool -{ - /** - * (PECL memcache >= 0.2.0)<br/> - * Open memcached server connection - * @link https://php.net/manual/en/memcache.connect.php - * @param string $host <p> - * Point to the host where memcached is listening for connections. This parameter - * may also specify other transports like <em>unix:///path/to/memcached.sock</em> - * to use UNIX domain sockets, in this case <b>port</b> must also - * be set to <em>0</em>. - * </p> - * @param int $port [optional] <p> - * Point to the port where memcached is listening for connections. Set this - * parameter to <em>0</em> when using UNIX domain sockets. - * </p> - * <p> - * Please note: <b>port</b> defaults to - * {@link https://php.net/manual/ru/memcache.ini.php#ini.memcache.default-port memcache.default_port} - * if not specified. For this reason it is wise to specify the port - * explicitly in this method call. - * </p> - * @param int $timeout [optional] <p>Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.</p> - * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p> - */ - public function connect ($host, $port, $timeout = 1) {} - - /** - * (PECL memcache >= 2.0.0)<br/> - * Add a memcached server to connection pool - * @link https://php.net/manual/en/memcache.addserver.php - * @param string $host <p> - * Point to the host where memcached is listening for connections. This parameter - * may also specify other transports like unix:///path/to/memcached.sock - * to use UNIX domain sockets, in this case <i>port</i> must also - * be set to 0. - * </p> - * @param int $port [optional] <p> - * Point to the port where memcached is listening for connections. - * Set this - * parameter to 0 when using UNIX domain sockets. - * </p> - * <p> - * Please note: <i>port</i> defaults to - * memcache.default_port - * if not specified. For this reason it is wise to specify the port - * explicitly in this method call. - * </p> - * @param bool $persistent [optional] <p> - * Controls the use of a persistent connection. Default to <b>TRUE</b>. - * </p> - * @param int $weight [optional] <p> - * Number of buckets to create for this server which in turn control its - * probability of it being selected. The probability is relative to the - * total weight of all servers. - * </p> - * @param int $timeout [optional] <p> - * Value in seconds which will be used for connecting to the daemon. Think - * twice before changing the default value of 1 second - you can lose all - * the advantages of caching if your connection is too slow. - * </p> - * @param int $retry_interval [optional] <p> - * Controls how often a failed server will be retried, the default value - * is 15 seconds. Setting this parameter to -1 disables automatic retry. - * Neither this nor the <i>persistent</i> parameter has any - * effect when the extension is loaded dynamically via <b>dl</b>. - * </p> - * <p> - * Each failed connection struct has its own timeout and before it has expired - * the struct will be skipped when selecting backends to serve a request. Once - * expired the connection will be successfully reconnected or marked as failed - * for another <i>retry_interval</i> seconds. The typical - * effect is that each web server child will retry the connection about every - * <i>retry_interval</i> seconds when serving a page. - * </p> - * @param bool $status [optional] <p> - * Controls if the server should be flagged as online. Setting this parameter - * to <b>FALSE</b> and <i>retry_interval</i> to -1 allows a failed - * server to be kept in the pool so as not to affect the key distribution - * algorithm. Requests for this server will then failover or fail immediately - * depending on the <i>memcache.allow_failover</i> setting. - * Default to <b>TRUE</b>, meaning the server should be considered online. - * </p> - * @param callable $failure_callback [optional] <p> - * Allows the user to specify a callback function to run upon encountering an - * error. The callback is run before failover is attempted. The function takes - * two parameters, the hostname and port of the failed server. - * </p> - * @param int $timeoutms [optional] <p> - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {} - - /** - * (PECL memcache >= 2.1.0)<br/> - * Changes server parameters and status at runtime - * @link https://secure.php.net/manual/en/memcache.setserverparams.php - * @param string $host <p>Point to the host where memcached is listening for connections.</p. - * @param int $port [optional] <p> - * Point to the port where memcached is listening for connections. - * </p> - * @param int $timeout [optional] <p> - * Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow. - * </p> - * @param int $retry_interval [optional] <p> - * Controls how often a failed server will be retried, the default value - * is 15 seconds. Setting this parameter to -1 disables automatic retry. - * Neither this nor the <b>persistent</b> parameter has any - * effect when the extension is loaded dynamically via {@link https://secure.php.net/manual/en/function.dl.php dl()}. - * </p> - * @param bool $status [optional] <p> - * Controls if the server should be flagged as online. Setting this parameter - * to <b>FALSE</b> and <b>retry_interval</b> to -1 allows a failed - * server to be kept in the pool so as not to affect the key distribution - * algorithm. Requests for this server will then failover or fail immediately - * depending on the <b>memcache.allow_failover</b> setting. - * Default to <b>TRUE</b>, meaning the server should be considered online. - * </p> - * @param callable $failure_callback [optional] <p> - * Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted. - * The function takes two parameters, the hostname and port of the failed server. - * </p> - * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p> - */ - public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {} - - /** - * - */ - public function setFailureCallback () {} - - /** - * (PECL memcache >= 2.1.0)<br/> - * Returns server status - * @link https://php.net/manual/en/memcache.getserverstatus.php - * @param string $host Point to the host where memcached is listening for connections. - * @param int $port Point to the port where memcached is listening for connections. - * @return int Returns a the servers status. 0 if server is failed, non-zero otherwise - */ - public function getServerStatus ($host, $port = 11211) {} - - /** - * - */ - public function findServer () {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Return version of the server - * @link https://php.net/manual/en/memcache.getversion.php - * @return string|boolean Returns a string of server version number or <b>FALSE</b> on failure. - */ - public function getVersion () {} - - /** - * (PECL memcache >= 2.0.0)<br/> - * Add an item to the server. If the key already exists, the value will not be added and <b>FALSE</b> will be returned. - * @link https://php.net/manual/en/memcache.add.php - * @param string $key The key that will be associated with the item. - * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized. - * @param int $flag [optional] <p> - * Use <b>MEMCACHE_COMPRESSED</b> to store the item - * compressed (uses zlib). - * </p> - * @param int $expire [optional] <p>Expiration time of the item. - * If it's equal to zero, the item will never expire. - * You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p> - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns <b>FALSE</b> if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set(). - */ - public function add ($key , $var, $flag = null, $expire = null) {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Stores an item var with key on the memcached server. Parameter expire is expiration time in seconds. - * If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time, - * it could be deleted from the cache to make place for other items). - * You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib). - * @link https://php.net/manual/en/memcache.set.php - * @param string $key The key that will be associated with the item. - * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized. - * @param int $flag [optional] Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib). - * @param int $expire [optional] Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days). - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function set ($key, $var, $flag = null, $expire = null) {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Replace value of the existing item - * @link https://php.net/manual/en/memcache.replace.php - * @param string $key <p>The key that will be associated with the item.</p> - * @param mixed $var <p>The variable to store. Strings and integers are stored as is, other types are stored serialized.</p> - * @param int $flag [optional] <p>Use <b>MEMCACHE_COMPRESSED</b> to store the item compressed (uses zlib).</p> - * @param int $expire [optional] <p>Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p> - * @return boolean Returns TRUE on success or FALSE on failure. - */ - public function replace ($key, $var, $flag = null, $expire = null) {} - - public function cas () {} - - public function append () {} - - /** - * @return string - */ - public function prepend () {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Retrieve item from the server - * @link https://php.net/manual/en/memcache.get.php - * @param string|array $key <p> - * The key or array of keys to fetch. - * </p> - * @param int|array $flags [optional] <p> - * If present, flags fetched along with the values will be written to this parameter. These - * flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}. - * The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate - * compression and serialization status). - * </p> - * @return string|array <p> - * Returns the string associated with the <b>key</b> or - * an array of found key-value pairs when <b>key</b> is an {@link https://php.net/manual/en/language.types.array.php array}. - * Returns <b>FALSE</b> on failure, <b>key</b> is not found or - * <b>key</b> is an empty {@link https://php.net/manual/en/language.types.array.php array}. - * </p> - */ - public function get ($key, &$flags = null) {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Delete item from the server - * https://secure.php.net/manual/ru/memcache.delete.php - * @param $key string The key associated with the item to delete. - * @param $timeout int [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter. - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function delete ($key, $timeout = 0 ) {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Get statistics of the server - * @link https://php.net/manual/ru/memcache.getstats.php - * @param string $type [optional] <p> - * The type of statistics to fetch. - * Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. - * According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p> - * @param int $slabid [optional] <p> - * Used in conjunction with <b>type</b> set to - * cachedump to identify the slab to dump from. The cachedump - * command ties up the server and is strictly to be used for - * debugging purposes. - * </p> - * @param int $limit [optional] <p> - * Used in conjunction with <b>type</b> set to cachedump to limit the number of entries to dump. - * </p> - * @return array|bool Returns an associative array of server statistics or <b>FALSE</b> on failure. - */ - public function getStats ($type = null, $slabid = null, $limit = 100) {} - - /** - * (PECL memcache >= 2.0.0)<br/> - * Get statistics from all servers in pool - * @link https://php.net/manual/en/memcache.getextendedstats.php - * @param string $type [optional] <p>The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p> - * @param int $slabid [optional] <p> - * Used in conjunction with <b>type</b> set to - * cachedump to identify the slab to dump from. The cachedump - * command ties up the server and is strictly to be used for - * debugging purposes. - * </p> - * @param int $limit Used in conjunction with type set to cachedump to limit the number of entries to dump. - * @return array|bool Returns a two-dimensional associative array of server statistics or <b>FALSE</b> - * Returns a two-dimensional associative array of server statistics or <b>FALSE</b> - * on failure. - */ - public function getExtendedStats ($type = null, $slabid = null, $limit = 100) {} - - /** - * (PECL memcache >= 2.0.0)<br/> - * Enable automatic compression of large values - * @link https://php.net/manual/en/memcache.setcompressthreshold.php - * @param int $thresold <p>Controls the minimum value length before attempting to compress automatically.</p> - * @param float $min_saving [optional] <p>Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.</p> - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setCompressThreshold ($thresold, $min_saving = 0.2) {} - /** - * (PECL memcache >= 0.2.0)<br/> - * Increment item's value - * @link https://php.net/manual/en/memcache.increment.php - * @param $key string Key of the item to increment. - * @param $value int [optional] increment the item by <b>value</b> - * @return int|boolean Returns new items value on success or <b>FALSE</b> on failure. - */ - public function increment ($key, $value = 1) {} - - /** - * (PECL memcache >= 0.2.0)<br/> - * Decrement item's value - * @link https://php.net/manual/en/memcache.decrement.php - * @param $key string Key of the item do decrement. - * @param $value int Decrement the item by <b>value</b>. - * @return int|boolean Returns item's new value on success or <b>FALSE</b> on failure. - */ - public function decrement ($key, $value = 1) {} - - /** - * (PECL memcache >= 0.4.0)<br/> - * Close memcached server connection - * @link https://php.net/manual/en/memcache.close.php - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function close () {} - - /** - * (PECL memcache >= 1.0.0)<br/> - * Flush all existing items at the server - * @link https://php.net/manual/en/memcache.flush.php - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function flush () {} -} - -/** - * Represents a connection to a set of memcache servers. - * @link https://php.net/manual/en/class.memcache.php - */ -class Memcache extends MemcachePool -{ - /** - * (PECL memcache >= 0.4.0)<br/> - * Open memcached server persistent connection - * @link https://php.net/manual/en/memcache.pconnect.php - * @param string $host <p> - * Point to the host where memcached is listening for connections. This parameter - * may also specify other transports like unix:///path/to/memcached.sock - * to use UNIX domain sockets, in this case <i>port</i> must also - * be set to 0. - * </p> - * @param int $port [optional] <p> - * Point to the port where memcached is listening for connections. Set this - * parameter to 0 when using UNIX domain sockets. - * </p> - * @param int $timeout [optional] <p> - * Value in seconds which will be used for connecting to the daemon. Think - * twice before changing the default value of 1 second - you can lose all - * the advantages of caching if your connection is too slow. - * </p> - * @return mixed a Memcache object or <b>FALSE</b> on failure. - */ - public function pconnect ($host, $port, $timeout = 1) {} -} - -// string $host [, int $port [, int $timeout ]] - -/** - * (PECL memcache >= 0.2.0)</br> - * Memcache::connect — Open memcached server connection - * @link https://php.net/manual/en/memcache.connect.php - * @param string $host <p> - * Point to the host where memcached is listening for connections. - * This parameter may also specify other transports like - * unix:///path/to/memcached.sock to use UNIX domain sockets, - * in this case port must also be set to 0. - * </p> - * @param int $port [optional] <p> - * Point to the port where memcached is listening for connections. - * Set this parameter to 0 when using UNIX domain sockets. - * Note: port defaults to memcache.default_port if not specified. - * For this reason it is wise to specify the port explicitly in this method call. - * </p> - * @param int $timeout [optional] <p> - * Value in seconds which will be used for connecting to the daemon. - * </p> - * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function memcache_connect ($host, $port, $timeout = 1) {} - -/** - * (PECL memcache >= 0.4.0) - * Memcache::pconnect — Open memcached server persistent connection - * - * @link https://php.net/manual/en/memcache.pconnect.php#example-5242 - * @param $host - * @param null $port - * @param int $timeout - * @return Memcache - */ -function memcache_pconnect ($host, $port=null, $timeout=1) {} - -function memcache_add_server () {} - -function memcache_set_server_params () {} - -function memcache_set_failure_callback () {} - -function memcache_get_server_status () {} - -function memcache_get_version () {} - -function memcache_add () {} - -function memcache_set () {} - -function memcache_replace () {} - -function memcache_cas () {} - -function memcache_append () {} - -function memcache_prepend () {} - -function memcache_get () {} - -function memcache_delete () {} - -/** - * (PECL memcache >= 0.2.0)<br/> - * Turn debug output on/off - * @link https://php.net/manual/en/function.memcache-debug.php - * @param bool $on_off <p> - * Turns debug output on if equals to <b>TRUE</b>. - * Turns debug output off if equals to <b>FALSE</b>. - * </p> - * @return bool <b>TRUE</b> if PHP was built with --enable-debug option, otherwise - * returns <b>FALSE</b>. - */ -function memcache_debug ($on_off) {} - -function memcache_get_stats () {} - -function memcache_get_extended_stats () {} - -function memcache_set_compress_threshold () {} - -function memcache_increment () {} - -function memcache_decrement () {} - -function memcache_close () {} - -function memcache_flush () {} - -define ('MEMCACHE_COMPRESSED', 2); -define ('MEMCACHE_USER1', 65536); -define ('MEMCACHE_USER2', 131072); -define ('MEMCACHE_USER3', 262144); -define ('MEMCACHE_USER4', 524288); -define ('MEMCACHE_HAVE_SESSION', 1); - -// End of memcache v.3.0.8 -?> diff --git a/tests/Utils/Stubs/memcached.php b/tests/Utils/Stubs/memcached.php deleted file mode 100644 index a7c906977361f77fc73936cebc33e8c91d3cb2a3..0000000000000000000000000000000000000000 --- a/tests/Utils/Stubs/memcached.php +++ /dev/null @@ -1,1309 +0,0 @@ -<?php - -// Start of memcached v.3.0.4 - -/** - * Represents a connection to a set of memcached servers. - * @link https://php.net/manual/en/class.memcached.php - */ -class Memcached -{ - /** - * <p>Enables or disables payload compression. When enabled, - * item values longer than a certain threshold (currently 100 bytes) will be - * compressed during storage and decompressed during retrieval - * transparently.</p> - * <p>Type: boolean, default: <b>TRUE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_COMPRESSION = -1001; - const OPT_COMPRESSION_TYPE = -1004; - - /** - * <p>This can be used to create a "domain" for your item keys. The value - * specified here will be prefixed to each of the keys. It cannot be - * longer than 128 characters and will reduce the - * maximum available key size. The prefix is applied only to the item keys, - * not to the server keys.</p> - * <p>Type: string, default: "".</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_PREFIX_KEY = -1002; - - /** - * <p> - * Specifies the serializer to use for serializing non-scalar values. - * The valid serializers are <b>Memcached::SERIALIZER_PHP</b> - * or <b>Memcached::SERIALIZER_IGBINARY</b>. The latter is - * supported only when memcached is configured with - * --enable-memcached-igbinary option and the - * igbinary extension is loaded. - * </p> - * <p>Type: integer, default: <b>Memcached::SERIALIZER_PHP</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SERIALIZER = -1003; - - /** - * <p>Indicates whether igbinary serializer support is available.</p> - * <p>Type: boolean.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HAVE_IGBINARY = 0; - - /** - * <p>Indicates whether JSON serializer support is available.</p> - * <p>Type: boolean.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HAVE_JSON = 0; - const HAVE_SESSION = 1; - const HAVE_SASL = 0; - - /** - * <p>Specifies the hashing algorithm used for the item keys. The valid - * values are supplied via <b>Memcached::HASH_*</b> constants. - * Each hash algorithm has its advantages and its disadvantages. Go with the - * default if you don't know or don't care.</p> - * <p>Type: integer, default: <b>Memcached::HASH_DEFAULT</b></p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_HASH = 2; - - /** - * <p>The default (Jenkins one-at-a-time) item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_DEFAULT = 0; - - /** - * <p>MD5 item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_MD5 = 1; - - /** - * <p>CRC item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_CRC = 2; - - /** - * <p>FNV1_64 item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_64 = 3; - - /** - * <p>FNV1_64A item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_64 = 4; - - /** - * <p>FNV1_32 item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_32 = 5; - - /** - * <p>FNV1_32A item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_32 = 6; - - /** - * <p>Hsieh item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_HSIEH = 7; - - /** - * <p>Murmur item key hashing algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_MURMUR = 8; - - /** - * <p>Specifies the method of distributing item keys to the servers. - * Currently supported methods are modulo and consistent hashing. Consistent - * hashing delivers better distribution and allows servers to be added to - * the cluster with minimal cache losses.</p> - * <p>Type: integer, default: <b>Memcached::DISTRIBUTION_MODULA.</b></p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_DISTRIBUTION = 9; - - /** - * <p>Modulo-based key distribution algorithm.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_MODULA = 0; - - /** - * <p>Consistent hashing key distribution algorithm (based on libketama).</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_CONSISTENT = 1; - const DISTRIBUTION_VIRTUAL_BUCKET = 6; - - /** - * <p>Enables or disables compatibility with libketama-like behavior. When - * enabled, the item key hashing algorithm is set to MD5 and distribution is - * set to be weighted consistent hashing distribution. This is useful - * because other libketama-based clients (Python, Ruby, etc.) with the same - * server configuration will be able to access the keys transparently. - * </p> - * <p> - * It is highly recommended to enable this option if you want to use - * consistent hashing, and it may be enabled by default in future - * releases. - * </p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_LIBKETAMA_COMPATIBLE = 16; - const OPT_LIBKETAMA_HASH = 17; - const OPT_TCP_KEEPALIVE = 32; - - /** - * <p>Enables or disables buffered I/O. Enabling buffered I/O causes - * storage commands to "buffer" instead of being sent. Any action that - * retrieves data causes this buffer to be sent to the remote connection. - * Quitting the connection or closing down the connection will also cause - * the buffered data to be pushed to the remote connection.</p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_BUFFER_WRITES = 10; - - /** - * <p>Enable the use of the binary protocol. Please note that you cannot - * toggle this option on an open connection.</p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_BINARY_PROTOCOL = 18; - - /** - * <p>Enables or disables asynchronous I/O. This is the fastest transport - * available for storage functions.</p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_NO_BLOCK = 0; - - /** - * <p>Enables or disables the no-delay feature for connecting sockets (may - * be faster in some environments).</p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_TCP_NODELAY = 1; - - /** - * <p>The maximum socket send buffer in bytes.</p> - * <p>Type: integer, default: varies by platform/kernel - * configuration.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_SEND_SIZE = 4; - - /** - * <p>The maximum socket receive buffer in bytes.</p> - * <p>Type: integer, default: varies by platform/kernel - * configuration.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_RECV_SIZE = 5; - - /** - * <p>In non-blocking mode this set the value of the timeout during socket - * connection, in milliseconds.</p> - * <p>Type: integer, default: 1000.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_CONNECT_TIMEOUT = 14; - - /** - * <p>The amount of time, in seconds, to wait until retrying a failed - * connection attempt.</p> - * <p>Type: integer, default: 0.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_RETRY_TIMEOUT = 15; - - /** - * <p>Socket sending timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * sending of data.</p> - * <p>Type: integer, default: 0.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SEND_TIMEOUT = 19; - - /** - * <p>Socket reading timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * reading of data.</p> - * <p>Type: integer, default: 0.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_RECV_TIMEOUT = 20; - - /** - * <p>Timeout for connection polling, in milliseconds.</p> - * <p>Type: integer, default: 1000.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_POLL_TIMEOUT = 8; - - /** - * <p>Enables or disables caching of DNS lookups.</p> - * <p>Type: boolean, default: <b>FALSE</b>.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_CACHE_LOOKUPS = 6; - - /** - * <p>Specifies the failure limit for server connection attempts. The - * server will be removed after this many continuous connection - * failures.</p> - * <p>Type: integer, default: 0.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - 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; - - - /** - * <p>The operation was successful.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SUCCESS = 0; - - /** - * <p>The operation failed in some fashion.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_FAILURE = 1; - - /** - * <p>DNS lookup failed.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_HOST_LOOKUP_FAILURE = 2; - - /** - * <p>Failed to read network data.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_UNKNOWN_READ_FAILURE = 7; - - /** - * <p>Bad command in memcached protocol.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PROTOCOL_ERROR = 8; - - /** - * <p>Error on the client side.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_CLIENT_ERROR = 9; - - /** - * <p>Error on the server side.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SERVER_ERROR = 10; - - /** - * <p>Failed to write network data.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_WRITE_FAILURE = 5; - - /** - * <p>Failed to do compare-and-swap: item you are trying to store has been - * modified since you last fetched it.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_DATA_EXISTS = 12; - - /** - * <p>Item was not stored: but not because of an error. This normally - * means that either the condition for an "add" or a "replace" command - * wasn't met, or that the item is in a delete queue.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NOTSTORED = 14; - - /** - * <p>Item with this key was not found (with "get" operation or "cas" - * operations).</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NOTFOUND = 16; - - /** - * <p>Partial network data read error.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PARTIAL_READ = 18; - - /** - * <p>Some errors occurred during multi-get.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SOME_ERRORS = 19; - - /** - * <p>Server list is empty.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NO_SERVERS = 20; - - /** - * <p>End of result set.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_END = 21; - - /** - * <p>System error.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_ERRNO = 26; - - /** - * <p>The operation was buffered.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_BUFFERED = 32; - - /** - * <p>The operation timed out.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_TIMEOUT = 31; - - /** - * <p>Bad key.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - 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; - - - - /** - * <p>Failed to create network socket.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11; - - /** - * <p>Payload failure: could not compress/decompress or serialize/unserialize the value.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PAYLOAD_FAILURE = -1001; - - /** - * <p>The default PHP serializer.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_PHP = 1; - - /** - * <p>The igbinary serializer. - * Instead of textual representation it stores PHP data structures in a - * compact binary form, resulting in space and time gains.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_IGBINARY = 2; - - /** - * <p>The JSON serializer. Requires PHP 5.2.10+.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_JSON = 3; - const SERIALIZER_JSON_ARRAY = 4; - const COMPRESSION_FASTLZ = 2; - const COMPRESSION_ZLIB = 1; - - /** - * <p>A flag for <b>Memcached::getMulti</b> and - * <b>Memcached::getMultiByKey</b> to ensure that the keys are - * returned in the same order as they were requested in. Non-existing keys - * get a default value of NULL.</p> - * @link https://php.net/manual/en/memcached.constants.php - */ - const GET_PRESERVE_ORDER = 1; - const GET_ERROR_RETURN_VALUE = false; - - - /** - * (PECL memcached >= 0.1.0)<br/> - * Create a Memcached instance - * @link https://php.net/manual/en/memcached.construct.php - * @param $persistent_id [optional] - * @param $callback [optional] - */ - public function __construct ($persistent_id = '', $on_new_object_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Return the result code of the last operation - * @link https://php.net/manual/en/memcached.getresultcode.php - * @return int Result code of the last Memcached operation. - */ - public function getResultCode () {} - - /** - * (PECL memcached >= 1.0.0)<br/> - * Return the message describing the result of the last operation - * @link https://php.net/manual/en/memcached.getresultmessage.php - * @return string Message describing the result of the last Memcached operation. - */ - public function getResultMessage () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Retrieve an item - * @link https://php.net/manual/en/memcached.get.php - * @param string $key <p> - * The key of the item to retrieve. - * </p> - * @param callable $cache_cb [optional] <p> - * Read-through caching callback or <b>NULL</b>. - * </p> - * @param int $flags [optional] <p> - * The flags for the get operation. - * </p> - * @return mixed the value stored in the cache or <b>FALSE</b> otherwise. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function get ($key, callable $cache_cb = null, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Retrieve an item from a specific server - * @link https://php.net/manual/en/memcached.getbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key of the item to fetch. - * </p> - * @param callable $cache_cb [optional] <p> - * Read-through caching callback or <b>NULL</b> - * </p> - * @param int $flags [optional] <p> - * The flags for the get operation. - * </p> - * @return mixed the value stored in the cache or <b>FALSE</b> otherwise. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Retrieve multiple items - * @link https://php.net/manual/en/memcached.getmulti.php - * @param array $keys <p> - * Array of keys to retrieve. - * </p> - * @param int $flags [optional] <p> - * The flags for the get operation. - * </p> - * @return mixed the array of found items or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function getMulti (array $keys, $flags = null) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Retrieve multiple items from a specific server - * @link https://php.net/manual/en/memcached.getmultibykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param array $keys <p> - * Array of keys to retrieve. - * </p> - * @param int $flags [optional] <p> - * The flags for the get operation. - * </p> - * @return array the array of found items or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function getMultiByKey ($server_key, array $keys, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Request multiple items - * @link https://php.net/manual/en/memcached.getdelayed.php - * @param array $keys <p> - * Array of keys to request. - * </p> - * @param bool $with_cas [optional] <p> - * Whether to request CAS token values also. - * </p> - * @param callable $value_cb [optional] <p> - * The result callback or <b>NULL</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Request multiple items from a specific server - * @link https://php.net/manual/en/memcached.getdelayedbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param array $keys <p> - * Array of keys to request. - * </p> - * @param bool $with_cas [optional] <p> - * Whether to request CAS token values also. - * </p> - * @param callable $value_cb [optional] <p> - * The result callback or <b>NULL</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Fetch the next result - * @link https://php.net/manual/en/memcached.fetch.php - * @return array the next result or <b>FALSE</b> otherwise. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_END</b> if result set is exhausted. - */ - public function fetch () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Fetch all the remaining results - * @link https://php.net/manual/en/memcached.fetchall.php - * @return array the results or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function fetchAll () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Store an item - * @link https://php.net/manual/en/memcached.set.php - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function set ($key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Store an item on a specific server - * @link https://php.net/manual/en/memcached.setbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Set a new expiration on an item - * @link https://php.net/manual/en/memcached.touch.php - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param int $expiration <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function touch ($key, $expiration = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Set a new expiration on an item on a specific server - * @link https://php.net/manual/en/memcached.touchbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param int $expiration <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function touchByKey ($server_key, $key, $expiration) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Store multiple items - * @link https://php.net/manual/en/memcached.setmulti.php - * @param array $items <p> - * An array of key/value pairs to store on the server. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function setMulti (array $items, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Store multiple items on a specific server - * @link https://php.net/manual/en/memcached.setmultibykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param array $items <p> - * An array of key/value pairs to store on the server. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Compare and swap an item - * @link https://php.net/manual/en/memcached.cas.php - * @param float $cas_token <p> - * Unique value associated with the existing item. Generated by memcache. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying - * to store has been modified since you last fetched it. - */ - public function cas ($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Compare and swap an item on a specific server - * @link https://php.net/manual/en/memcached.casbykey.php - * @param float $cas_token <p> - * Unique value associated with the existing item. Generated by memcache. - * </p> - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying - * to store has been modified since you last fetched it. - */ - public function casByKey ($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Add an item under a new key - * @link https://php.net/manual/en/memcached.add.php - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key already exists. - */ - public function add ($key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Add an item under a new key on a specific server - * @link https://php.net/manual/en/memcached.addbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key already exists. - */ - public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Append data to an existing item - * @link https://php.net/manual/en/memcached.append.php - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param string $value <p> - * The string to append. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function append ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Append data to an existing item on a specific server - * @link https://php.net/manual/en/memcached.appendbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param string $value <p> - * The string to append. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function appendByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Prepend data to an existing item - * @link https://php.net/manual/en/memcached.prepend.php - * @param string $key <p> - * The key of the item to prepend the data to. - * </p> - * @param string $value <p> - * The string to prepend. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function prepend ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Prepend data to an existing item on a specific server - * @link https://php.net/manual/en/memcached.prependbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key of the item to prepend the data to. - * </p> - * @param string $value <p> - * The string to prepend. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function prependByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Replace the item under an existing key - * @link https://php.net/manual/en/memcached.replace.php - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function replace ($key, $value, $expiration = null, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Replace the item under an existing key on a specific server - * @link https://php.net/manual/en/memcached.replacebykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key under which to store the value. - * </p> - * @param mixed $value <p> - * The value to store. - * </p> - * @param int $expiration [optional] <p> - * The expiration time, defaults to 0. See Expiration Times for more info. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTSTORED</b> if the key does not exist. - */ - public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Delete an item - * @link https://php.net/manual/en/memcached.delete.php - * @param string $key <p> - * The key to be deleted. - * </p> - * @param int $time [optional] <p> - * The amount of time the server will wait to delete the item. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function delete ($key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Delete multiple items - * @link https://php.net/manual/en/memcached.deletemulti.php - * @param array $keys <p> - * The keys to be deleted. - * </p> - * @param int $time [optional] <p> - * The amount of time the server will wait to delete the items. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function deleteMulti (array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Delete an item from a specific server - * @link https://php.net/manual/en/memcached.deletebykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key to be deleted. - * </p> - * @param int $time [optional] <p> - * The amount of time the server will wait to delete the item. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function deleteByKey ($server_key, $key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Delete multiple items from a specific server - * @link https://php.net/manual/en/memcached.deletemultibykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param array $keys <p> - * The keys to be deleted. - * </p> - * @param int $time [optional] <p> - * The amount of time the server will wait to delete the items. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * The <b>Memcached::getResultCode</b> will return - * <b>Memcached::RES_NOTFOUND</b> if the key does not exist. - */ - public function deleteMultiByKey ($server_key, array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Increment numeric item's value - * @link https://php.net/manual/en/memcached.increment.php - * @param string $key <p> - * The key of the item to increment. - * </p> - * @param int $offset [optional] <p> - * The amount by which to increment the item's value. - * </p> - * @param int $initial_value [optional] <p> - * The value to set the item to if it doesn't currently exist. - * </p> - * @param int $expiry [optional] <p> - * The expiry time to set on the item. - * </p> - * @return int new item's value on success or <b>FALSE</b> on failure. - */ - public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Decrement numeric item's value - * @link https://php.net/manual/en/memcached.decrement.php - * @param string $key <p> - * The key of the item to decrement. - * </p> - * @param int $offset [optional] <p> - * The amount by which to decrement the item's value. - * </p> - * @param int $initial_value [optional] <p> - * The value to set the item to if it doesn't currently exist. - * </p> - * @param int $expiry [optional] <p> - * The expiry time to set on the item. - * </p> - * @return int item's new value on success or <b>FALSE</b> on failure. - */ - public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Increment numeric item's value, stored on a specific server - * @link https://php.net/manual/en/memcached.incrementbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key of the item to increment. - * </p> - * @param int $offset [optional] <p> - * The amount by which to increment the item's value. - * </p> - * @param int $initial_value [optional] <p> - * The value to set the item to if it doesn't currently exist. - * </p> - * @param int $expiry [optional] <p> - * The expiry time to set on the item. - * </p> - * @return int new item's value on success or <b>FALSE</b> on failure. - */ - public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Decrement numeric item's value, stored on a specific server - * @link https://php.net/manual/en/memcached.decrementbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @param string $key <p> - * The key of the item to decrement. - * </p> - * @param int $offset [optional] <p> - * The amount by which to decrement the item's value. - * </p> - * @param int $initial_value [optional] <p> - * The value to set the item to if it doesn't currently exist. - * </p> - * @param int $expiry [optional] <p> - * The expiry time to set on the item. - * </p> - * @return int item's new value on success or <b>FALSE</b> on failure. - */ - public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Add a server to the server pool - * @link https://php.net/manual/en/memcached.addserver.php - * @param string $host <p> - * The hostname of the memcache server. If the hostname is invalid, data-related - * operations will set - * <b>Memcached::RES_HOST_LOOKUP_FAILURE</b> result code. - * </p> - * @param int $port <p> - * The port on which memcache is running. Usually, this is - * 11211. - * </p> - * @param int $weight [optional] <p> - * The weight of the server relative to the total weight of all the - * servers in the pool. This controls the probability of the server being - * selected for operations. This is used only with consistent distribution - * option and usually corresponds to the amount of memory available to - * memcache on that server. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function addServer ($host, $port, $weight = 0) {} - - /** - * (PECL memcached >= 0.1.1)<br/> - * Add multiple servers to the server pool - * @link https://php.net/manual/en/memcached.addservers.php - * @param array $servers - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function addServers (array $servers) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Get the list of the servers in the pool - * @link https://php.net/manual/en/memcached.getserverlist.php - * @return array The list of all servers in the server pool. - */ - public function getServerList () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Map a key to a server - * @link https://php.net/manual/en/memcached.getserverbykey.php - * @param string $server_key <p> - * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - * </p> - * @return array an array containing three keys of host, - * port, and weight on success or <b>FALSE</b> - * on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function getServerByKey ($server_key) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Clears all servers from the server list - * @link https://php.net/manual/en/memcached.resetserverlist.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function resetServerList () {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Close any open connections - * @link https://php.net/manual/en/memcached.quit.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function quit () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Get server pool statistics - * @link https://php.net/manual/en/memcached.getstats.php - * @param string $type - * @return array Array of server statistics, one entry per server. - */ - public function getStats ($type = null) {} - - /** - * (PECL memcached >= 0.1.5)<br/> - * Get server pool version info - * @link https://php.net/manual/en/memcached.getversion.php - * @return array Array of server versions, one entry per server. - */ - public function getVersion () {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Gets the keys stored on all the servers - * @link https://php.net/manual/en/memcached.getallkeys.php - * @return array the keys stored on all the servers on success or <b>FALSE</b> on failure. - */ - public function getAllKeys () {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Invalidate all items in the cache - * @link https://php.net/manual/en/memcached.flush.php - * @param int $delay [optional] <p> - * Numer of seconds to wait before invalidating the items. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * Use <b>Memcached::getResultCode</b> if necessary. - */ - public function flush ($delay = 0) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Retrieve a Memcached option value - * @link https://php.net/manual/en/memcached.getoption.php - * @param int $option <p> - * One of the Memcached::OPT_* constants. - * </p> - * @return mixed the value of the requested option, or <b>FALSE</b> on - * error. - */ - public function getOption ($option) {} - - /** - * (PECL memcached >= 0.1.0)<br/> - * Set a Memcached option - * @link https://php.net/manual/en/memcached.setoption.php - * @param int $option - * @param mixed $value - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setOption ($option, $value) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Set Memcached options - * @link https://php.net/manual/en/memcached.setoptions.php - * @param array $options <p> - * An associative array of options where the key is the option to set and - * the value is the new value for the option. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setOptions (array $options) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Set the credentials to use for authentication - * @link https://secure.php.net/manual/en/memcached.setsaslauthdata.php - * @param string $username <p> - * The username to use for authentication. - * </p> - * @param string $password <p> - * The password to use for authentication. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setSaslAuthData (string $username , string $password) {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Check if a persitent connection to memcache is being used - * @link https://php.net/manual/en/memcached.ispersistent.php - * @return bool true if Memcache instance uses a persistent connection, false otherwise. - */ - public function isPersistent () {} - - /** - * (PECL memcached >= 2.0.0)<br/> - * Check if the instance was recently created - * @link https://php.net/manual/en/memcached.ispristine.php - * @return bool the true if instance is recently created, false otherwise. - */ - 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) {} - -} - -/** - * @link https://php.net/manual/en/class.memcachedexception.php - */ -if (!class_exists('MemcachedException')) { - class MemcachedException extends RuntimeException - { - } -} -// End of memcached v.3.0.4 diff --git a/tests/Utils/Stubs/predis.php b/tests/Utils/Stubs/predis.php deleted file mode 100644 index de29405ba26ac3bd745bb86f2d353c90931df5e9..0000000000000000000000000000000000000000 --- a/tests/Utils/Stubs/predis.php +++ /dev/null @@ -1,299 +0,0 @@ -<?php - -namespace Predis; - -/** - * Client class used for connecting and executing commands on Redis. - * - * This is the main high-level abstraction of Predis upon which various other - * abstractions are built. Internally it aggregates various other classes each - * one with its own responsibility and scope. - * - * {@inheritdoc} - * - * @author Daniele Alessandri <suppakilla@gmail.com> - */ -class Client -{ - /** - * @param mixed $parameters Connection parameters for one or more servers. - * @param mixed $options Options to configure some behaviours of the client. - */ - public function __construct($parameters = null, $options = null) - { - } - - /** - * Creates a new instance of Predis\Configuration\Options from different - * types of arguments or simply returns the passed argument if it is an - * instance of Predis\Configuration\OptionsInterface. - * - * @param mixed $options Client options. - * - * @throws \InvalidArgumentException - * - * @return OptionsInterface - */ - protected function createOptions($options) - { - } - - /** - * Creates single or aggregate connections from different types of arguments - * (string, array) or returns the passed argument if it is an instance of a - * class implementing Predis\Connection\ConnectionInterface. - * - * Accepted types for connection parameters are: - * - * - Instance of Predis\Connection\ConnectionInterface. - * - Instance of Predis\Connection\ParametersInterface. - * - Array - * - String - * - Callable - * - * @param mixed $parameters Connection parameters or connection instance. - * - * @throws \InvalidArgumentException - * - * @return ConnectionInterface - */ - protected function createConnection($parameters) - { - } - - /** - * Wraps a callable to make sure that its returned value represents a valid - * connection type. - * - * @param mixed $callable - * - * @return \Closure - */ - protected function getConnectionInitializerWrapper($callable) - { - } - - /** - * {@inheritdoc} - */ - public function getProfile() - { - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - } - - /** - * Creates a new client instance for the specified connection ID or alias, - * only when working with an aggregate connection (cluster, replication). - * The new client instances uses the same options of the original one. - * - * @param string $connectionID Identifier of a connection. - * - * @throws \InvalidArgumentException - * - * @return Client - */ - public function getClientFor($connectionID) - { - } - - /** - * Opens the underlying connection and connects to the server. - */ - public function connect() - { - } - - /** - * Closes the underlying connection and disconnects from the server. - */ - public function disconnect() - { - } - - /** - * Closes the underlying connection and disconnects from the server. - * - * This is the same as `Client::disconnect()` as it does not actually send - * the `QUIT` command to Redis, but simply closes the connection. - */ - public function quit() - { - } - - /** - * Returns the current state of the underlying connection. - * - * @return bool - */ - public function isConnected() - { - } - - /** - * {@inheritdoc} - */ - public function getConnection() - { - } - - /** - * Retrieves the specified connection from the aggregate connection when the - * client is in cluster or replication mode. - * - * @param string $connectionID Index or alias of the single connection. - * - * @throws NotSupportedException - * - * @return Connection\NodeConnectionInterface - */ - public function getConnectionById($connectionID) - { - } - - /** - * Executes a command without filtering its arguments, parsing the response, - * applying any prefix to keys or throwing exceptions on Redis errors even - * regardless of client options. - * - * It is possible to identify Redis error responses from normal responses - * using the second optional argument which is populated by reference. - * - * @param array $arguments Command arguments as defined by the command signature. - * @param bool $error Set to TRUE when Redis returned an error response. - * - * @return mixed - */ - public function executeRaw(array $arguments, &$error = null) - { - } - - /** - * {@inheritdoc} - */ - public function __call($commandID, $arguments) - { - } - - /** - * {@inheritdoc} - */ - public function createCommand($commandID, $arguments = array()) - { - } - - /** - * {@inheritdoc} - */ - public function executeCommand(CommandInterface $command) - { - } - - /** - * Handles -ERR responses returned by Redis. - * - * @param CommandInterface $command Redis command that generated the error. - * @param ErrorResponseInterface $response Instance of the error response. - * - * @throws ServerException - * - * @return mixed - */ - protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response) - { - } - - /** - * Creates a new pipeline context and returns it, or returns the results of - * a pipeline executed inside the optionally provided callable object. - * - * @param mixed ... Array of options, a callable for execution, or both. - * - * @return Pipeline|array - */ - public function pipeline(/* arguments */) - { - } - - /** - * Actual pipeline context initializer method. - * - * @param array $options Options for the context. - * @param mixed $callable Optional callable used to execute the context. - * - * @return Pipeline|array - */ - protected function createPipeline(array $options = null, $callable = null) - { - } - - /** - * Creates a new transaction context and returns it, or returns the results - * of a transaction executed inside the optionally provided callable object. - * - * @param mixed ... Array of options, a callable for execution, or both. - * - * @return MultiExecTransaction|array - */ - public function transaction(/* arguments */) - { - } - - /** - * Actual transaction context initializer method. - * - * @param array $options Options for the context. - * @param mixed $callable Optional callable used to execute the context. - * - * @return MultiExecTransaction|array - */ - protected function createTransaction(array $options = null, $callable = null) - { - } - - /** - * Creates a new publish/subscribe context and returns it, or starts its loop - * inside the optionally provided callable object. - * - * @param mixed ... Array of options, a callable for execution, or both. - * - * @return PubSubConsumer|null - */ - public function pubSubLoop(/* arguments */) - { - } - - /** - * Actual publish/subscribe context initializer method. - * - * @param array $options Options for the context. - * @param mixed $callable Optional callable used to execute the context. - * - * @return PubSubConsumer|null - */ - protected function createPubSub(array $options = null, $callable = null) - { - } - - /** - * Creates a new monitor consumer and returns it. - * - * @return MonitorConsumer - */ - public function monitor() - { - } - - /** - * {@inheritdoc} - */ - public function getIterator() - { - } -} -