From 7257793fc4ec5c40c193ca12b5747a4f49c6f4fe Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Fri, 10 Jul 2020 10:58:33 +0200 Subject: [PATCH] Hello psalm Signed-off-by: Daniel Kesselberg --- .github/workflows/static-code-analysis.yml | 22 + build/stubs/apcu.php | 659 ++ build/stubs/imagick.php | 6744 ++++++++++++++++++++ build/stubs/memcached.php | 1528 +++++ build/stubs/redis.php | 5262 +++++++++++++++ build/stubs/redis_cluster.php | 3563 +++++++++++ psalm.xml | 38 + 7 files changed, 17816 insertions(+) create mode 100644 .github/workflows/static-code-analysis.yml create mode 100644 build/stubs/apcu.php create mode 100644 build/stubs/imagick.php create mode 100644 build/stubs/memcached.php create mode 100644 build/stubs/redis.php create mode 100644 build/stubs/redis_cluster.php create mode 100644 psalm.xml diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml new file mode 100644 index 00000000000..5633c3abc29 --- /dev/null +++ b/.github/workflows/static-code-analysis.yml @@ -0,0 +1,22 @@ +name: Static code analysis + +on: [pull_request] + +jobs: + static-code-analysis: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Remove composer.json + shell: bash + run: rm composer.json composer.lock + - name: Psalm + uses: docker://jakzal/phpqa:php7.4-alpine + with: + args: psalm --monochrome --no-progress --output-format=text diff --git a/build/stubs/apcu.php b/build/stubs/apcu.php new file mode 100644 index 00000000000..ec096fb5e25 --- /dev/null +++ b/build/stubs/apcu.php @@ -0,0 +1,659 @@ + value pairs. + * The constant_name must follow the normal constant naming rules. Value must evaluate to a scalar value. + * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive; + * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE + * the constants will be declared as case-insensitive symbols. + * @return bool Returns TRUE on success or FALSE on failure. + */ +function apc_define_constants($key, array $constants, $case_sensitive = true){} + +/** + * Caches a variable in the data store, only if it's not already stored + * @link https://php.net/manual/en/function.apc-add.php + * @param string $key Store the variable using this name. Keys are cache-unique, + * so attempting to use apc_add() to store data with a key that already exists will not + * overwrite the existing data, and will instead return FALSE. (This is the only difference + * between apc_add() and apc_store().) + * @param mixed $var The variable to store + * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed, + * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied + * (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @return bool + */ +function apc_add($key, $var, $ttl = 0){} + +/** + * Stores a file in the bytecode cache, bypassing all filters + * @link https://php.net/manual/en/function.apc-compile-file.php + * @param string|string[] $filename Full or relative path to a PHP file that will be + * compiled and stored in the bytecode cache. + * @param bool $atomic + * @return bool Returns TRUE on success or FALSE on failure. + */ +function apc_compile_file($filename, $atomic = true){} + +/** + * Loads a set of constants from the cache + * @link https://php.net/manual/en/function.apc-load-constants.php + * @param string $key The name of the constant set (that was stored + * with apc_define_constants()) to be retrieved. + * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive; + * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE + * the constants will be declared as case-insensitive symbols. + * @return bool Returns TRUE on success or FALSE on failure. + */ +function apc_load_constants($key, $case_sensitive = true){} + +/** + * Checks if APC key exists + * @link https://php.net/manual/en/function.apc-exists.php + * @param bool|string[] $keys A string, or an array of strings, that contain keys. + * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE + * Or if an array was passed to keys, then an array is returned that + * contains all existing keys, or an empty array if none exist. + */ +function apc_exists($keys){} + +/** + * Deletes the given files from the opcode cache + * + * Accepts a string, array of strings, or APCIterator object. + * Returns True/False, or for an Array an Array of failed files. + * + * @link https://php.net/manual/en/function.apc-delete-file.php + * @param string|string[]|APCIterator $keys + * @return bool|string[] + */ +function apc_delete_file($keys){} + +/** + * Increase a stored number + * @link https://php.net/manual/en/function.apc-inc.php + * @param string $key The key of the value being increased. + * @param int $step The step, or value to increase. + * @param bool $success Optionally pass the success or fail boolean value to this referenced variable. + * @return int|bool Returns the current value of key's value on success, or FALSE on failure. + */ +function apc_inc($key, $step = 1, &$success = null){} + +/** + * Decrease a stored number + * @link https://php.net/manual/en/function.apc-dec.php + * @param string $key The key of the value being decreased. + * @param int $step The step, or value to decrease. + * @param bool $success Optionally pass the success or fail boolean value to this referenced variable. + * @return int|bool Returns the current value of key's value on success, or FALSE on failure. + */ +function apc_dec($key, $step = 1, &$success = null){} + +/** + * @link https://php.net/manual/en/function.apc-cas.php + * @param string $key + * @param int $old + * @param int $new + * @return bool + */ +function apc_cas($key, $old, $new){} + +/** + * Returns a binary dump of the given files and user variables from the APC cache + * + * A NULL for files or user_vars signals a dump of every entry, while array() will dump nothing. + * + * @link https://php.net/manual/en/function.apc-bin-dump.php + * @param string[]|null $files The files. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing. + * @param string[]|null $user_vars The user vars. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing. + * @return string|bool|null Returns a binary dump of the given files and user variables from the APC cache, FALSE if APC is not enabled, or NULL if an unknown error is encountered. + */ +function apc_bin_dump($files = null, $user_vars = null){} + +/** + * Output a binary dump of the given files and user variables from the APC cache to the named file + * @link https://php.net/manual/en/function.apc-bin-dumpfile.php + * @param string[]|null $files The file names being dumped. + * @param string[]|null $user_vars The user variables being dumped. + * @param string $filename The filename where the dump is being saved. + * @param int $flags Flags passed to the filename stream. See the file_put_contents() documentation for details. + * @param resource $context The context passed to the filename stream. See the file_put_contents() documentation for details. + * @return int|bool The number of bytes written to the file, otherwise FALSE if APC + * is not enabled, filename is an invalid file name, filename can't be opened, + * the file dump can't be completed (e.g., the hard drive is out of disk space), + * or an unknown error was encountered. + */ +function apc_bin_dumpfile($files, $user_vars, $filename, $flags = 0, $context = null){} + +/** + * Load the given binary dump into the APC file/user cache + * @link https://php.net/manual/en/function.apc-bin-load.php + * @param string $data The binary dump being loaded, likely from apc_bin_dump(). + * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both. + * @return bool Returns TRUE if the binary dump data was loaded with success, otherwise FALSE is returned. + * FALSE is returned if APC is not enabled, or if the data is not a valid APC binary dump (e.g., unexpected size). + */ +function apc_bin_load($data, $flags = 0){} + +/** + * Load the given binary dump from the named file into the APC file/user cache + * @link https://php.net/manual/en/function.apc-bin-loadfile.php + * @param string $filename The file name containing the dump, likely from apc_bin_dumpfile(). + * @param resource $context The files context. + * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both. + * @return bool Returns TRUE on success, otherwise FALSE Reasons it may return FALSE include APC + * is not enabled, filename is an invalid file name or empty, filename can't be opened, + * the file dump can't be completed, or if the data is not a valid APC binary dump (e.g., unexpected size). + */ +function apc_bin_loadfile($filename, $context = null, $flags = 0){} + +/** + * The APCIterator class + * + * The APCIterator class makes it easier to iterate over large APC caches. + * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number + * of entries per lock instance, so it frees the cache locks for other activities rather than hold up + * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more + * efficient as it's been moved to the C level. + * + * @link https://php.net/manual/en/class.apciterator.php + */ +class APCIterator implements Iterator +{ + /** + * Constructs an APCIterator iterator object + * @link https://php.net/manual/en/apciterator.construct.php + * @param string $cache The cache type, which will be 'user' or 'file'. + * @param string|string[]|null $search A PCRE regular expression that matches against APC key names, + * either as a string for a single regular expression, or as an array of regular expressions. + * Or, optionally pass in NULL to skip the search. + * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants. + * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100. + * @param int $list The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_INACTIVE. + */ + public function __construct($cache, $search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE){} + + /** + * Rewinds back the iterator to the first element + * @link https://php.net/manual/en/apciterator.rewind.php + */ + public function rewind(){} + + /** + * Checks if the current iterator position is valid + * @link https://php.net/manual/en/apciterator.valid.php + * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE. + */ + public function valid(){} + + /** + * Gets the current item from the APCIterator stack + * @link https://php.net/manual/en/apciterator.current.php + * @return mixed Returns the current item on success, or FALSE if no more items or exist, or on failure. + */ + public function current(){} + + /** + * Gets the current iterator key + * @link https://php.net/manual/en/apciterator.key.php + * @return string|int|bool Returns the key on success, or FALSE upon failure. + */ + public function key(){} + + /** + * Moves the iterator pointer to the next element + * @link https://php.net/manual/en/apciterator.next.php + * @return bool Returns TRUE on success or FALSE on failure. + */ + public function next(){} + + /** + * Gets the total number of cache hits + * @link https://php.net/manual/en/apciterator.gettotalhits.php + * @return int|bool The number of hits on success, or FALSE on failure. + */ + public function getTotalHits(){} + + /** + * Gets the total cache size + * @link https://php.net/manual/en/apciterator.gettotalsize.php + * @return int|bool The total cache size. + */ + public function getTotalSize(){} + + /** + * Get the total count + * @link https://php.net/manual/en/apciterator.gettotalcount.php + * @return int|bool The total count. + */ + public function getTotalCount(){} +} + +/** + * Stubs for APCu 5.0.0 + */ + +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_LIST_ACTIVE', 1); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_LIST_DELETED', 2); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_TYPE', 1); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_KEY', 2); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_FILENAME', 4); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_DEVICE', 8); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_INODE', 16); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_VALUE', 32); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_MD5', 64); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_NUM_HITS', 128); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_MTIME', 256); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_CTIME', 512); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_DTIME', 1024); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_ATIME', 2048); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_REFCOUNT', 4096); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_MEM_SIZE', 8192); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_TTL', 16384); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_NONE', 0); +/** + * @link https://php.net/manual/en/apcu.constants.php + */ +define('APC_ITER_ALL', -1); + + +/** + * Clears the APCu cache + * @link https://php.net/manual/en/function.apcu-clear-cache.php + * + * @return bool Returns TRUE always. + */ +function apcu_clear_cache(){} + +/** + * Retrieves APCu Shared Memory Allocation information + * @link https://php.net/manual/en/function.apcu-sma-info.php + * @param bool $limited When set to FALSE (default) apcu_sma_info() will + * return a detailed information about each segment. + * + * @return array|false Array of Shared Memory Allocation data; FALSE on failure. + */ +function apcu_sma_info($limited = false){} + +/** + * Cache a variable in the data store + * @link https://php.net/manual/en/function.apcu-store.php + * @param string|array $key String: Store the variable using this name. Keys are cache-unique, + * so storing a second value with the same key will overwrite the original value. + * Array: Names in key, variables in value. + * @param mixed $var [optional] The variable to store + * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds. After the ttl has passed, + * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied + * (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @return bool|array Returns TRUE on success or FALSE on failure | array with error keys. + */ +function apcu_store($key, $var, $ttl = 0){} + +/** + * Fetch a stored variable from the cache + * @link https://php.net/manual/en/function.apcu-fetch.php + * @param string|string[] $key The key used to store the value (with apcu_store()). + * If an array is passed then each element is fetched and returned. + * @param bool $success Set to TRUE in success and FALSE in failure. + * @return mixed The stored variable or array of variables on success; FALSE on failure. + */ +function apcu_fetch($key, &$success = null){} + +/** + * Removes a stored variable from the cache + * @link https://php.net/manual/en/function.apcu-delete.php + * @param string|string[]|APCuIterator $key The key used to store the value (with apcu_store()). + * @return bool|string[] Returns TRUE on success or FALSE on failure. For array of keys returns list of failed keys. + */ +function apcu_delete($key){} + +/** + * Caches a variable in the data store, only if it's not already stored + * @link https://php.net/manual/en/function.apcu-add.php + * @param string|array $key Store the variable using this name. Keys are cache-unique, + * so attempting to use apcu_add() to store data with a key that already exists will not + * overwrite the existing data, and will instead return FALSE. (This is the only difference + * between apcu_add() and apcu_store().) + * Array: Names in key, variables in value. + * @param mixed $var The variable to store + * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed, + * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied + * (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @return bool|array Returns TRUE if something has effectively been added into the cache, FALSE otherwise. + * Second syntax returns array with error keys. + */ +function apcu_add($key, $var, $ttl = 0){} + +/** + * Checks if APCu key exists + * @link https://php.net/manual/en/function.apcu-exists.php + * @param string|string[] $keys A string, or an array of strings, that contain keys. + * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE + * Or if an array was passed to keys, then an array is returned that + * contains all existing keys, or an empty array if none exist. + */ +function apcu_exists($keys){} + +/** + * Increase a stored number + * @link https://php.net/manual/en/function.apcu-inc.php + * @param string $key The key of the value being increased. + * @param int $step The step, or value to increase. + * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed, + * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied + * (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @param bool $success Optionally pass the success or fail boolean value to this referenced variable. + * @return int|false Returns the current value of key's value on success, or FALSE on failure. + */ +function apcu_inc($key, $step = 1, &$success = null, $ttl = 0){} + +/** + * Decrease a stored number + * @link https://php.net/manual/en/function.apcu-dec.php + * @param string $key The key of the value being decreased. + * @param int $step The step, or value to decrease. + * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed, + * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied + * (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @param bool $success Optionally pass the success or fail boolean value to this referenced variable. + * @return int|false Returns the current value of key's value on success, or FALSE on failure. + */ +function apcu_dec($key, $step = 1, &$success = null, $ttl = 0){} + +/** + * Updates an old value with a new value + * + * apcu_cas() updates an already existing integer value if the old parameter matches the currently stored value + * with the value of the new parameter. + * + * @link https://php.net/manual/en/function.apcu-cas.php + * @param string $key The key of the value being updated. + * @param int $old The old value (the value currently stored). + * @param int $new The new value to update to. + * @return bool Returns TRUE on success or FALSE on failure. + */ +function apcu_cas($key, $old, $new){} + +/** + * Atomically fetch or generate a cache entry + * + *

Atomically attempts to find key in the cache, if it cannot be found generator is called, + * passing key as the only argument. The return value of the call is then cached with the optionally + * specified ttl, and returned. + *

+ * + *

Note: When control enters apcu_entry() the lock for the cache is acquired exclusively, it is released when + * control leaves apcu_entry(): In effect, this turns the body of generator into a critical section, + * disallowing two processes from executing the same code paths concurrently. + * In addition, it prohibits the concurrent execution of any other APCu functions, + * since they will acquire the same lock. + *

+ * + * @link https://php.net/manual/en/function.apcu-entry.php + * + * @param string $key Identity of cache entry + * @param callable $generator A callable that accepts key as the only argument and returns the value to cache. + *

Warning + * The only APCu function that can be called safely by generator is apcu_entry().

+ * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds. + * After the ttl has passed, the stored variable will be expunged from the cache (on the next request). + * If no ttl is supplied (or if the ttl is 0), the value will persist until it is removed from the cache manually, + * or otherwise fails to exist in the cache (clear, restart, etc.). + * @return mixed Returns the cached value + * @since APCu 5.1.0 + */ +function apcu_entry($key, callable $generator, $ttl = 0){} + +/** + * Retrieves cached information from APCu's data store + * + * @link https://php.net/manual/en/function.apcu-cache-info.php + * + * @param bool $limited If limited is TRUE, the return value will exclude the individual list of cache entries. + * This is useful when trying to optimize calls for statistics gathering. + * @return array|false Array of cached data (and meta-data) or FALSE on failure + */ +function apcu_cache_info($limited = false){} + +/** + * Whether APCu is usable in the current environment + * + * @link https://www.php.net/manual/en/function.apcu-enabled.php + * + * @return bool + */ +function apcu_enabled(){} + +/** + * @param string $key + */ +function apcu_key_info($key){} + +/** + * The APCuIterator class + * + * The APCuIterator class makes it easier to iterate over large APCu caches. + * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number + * of entries per lock instance, so it frees the cache locks for other activities rather than hold up + * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more + * efficient as it's been moved to the C level. + * + * @link https://php.net/manual/en/class.apcuiterator.php + * @since APCu 5.0.0 + */ +class APCuIterator implements Iterator +{ + /** + * Constructs an APCuIterator iterator object + * @link https://php.net/manual/en/apcuiterator.construct.php + * @param string|string[]|null $search A PCRE regular expression that matches against APCu key names, + * either as a string for a single regular expression, or as an array of regular expressions. + * Or, optionally pass in NULL to skip the search. + * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants. + * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100. + * @param int $list The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_DELETED. + */ + public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE){} + + /** + * Rewinds back the iterator to the first element + * @link https://php.net/manual/en/apcuiterator.rewind.php + */ + public function rewind(){} + + /** + * Checks if the current iterator position is valid + * @link https://php.net/manual/en/apcuiterator.valid.php + * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE. + */ + public function valid(){} + + /** + * Gets the current item from the APCuIterator stack + * @link https://php.net/manual/en/apcuiterator.current.php + * @return mixed Returns the current item on success, or FALSE if no more items or exist, or on failure. + */ + public function current(){} + + /** + * Gets the current iterator key + * @link https://php.net/manual/en/apcuiterator.key.php + * @return string|int|false Returns the key on success, or FALSE upon failure. + */ + public function key(){} + + /** + * Moves the iterator pointer to the next element + * @link https://php.net/manual/en/apcuiterator.next.php + * @return bool Returns TRUE on success or FALSE on failure. + */ + public function next(){} + + /** + * Gets the total number of cache hits + * @link https://php.net/manual/en/apcuiterator.gettotalhits.php + * @return int|false The number of hits on success, or FALSE on failure. + */ + public function getTotalHits(){} + + /** + * Gets the total cache size + * @link https://php.net/manual/en/apcuiterator.gettotalsize.php + * @return int|false The total cache size. + */ + public function getTotalSize(){} + + /** + * Get the total count + * @link https://php.net/manual/en/apcuiterator.gettotalcount.php + * @return int|false The total count. + */ + public function getTotalCount(){} +} diff --git a/build/stubs/imagick.php b/build/stubs/imagick.php new file mode 100644 index 00000000000..0c489736223 --- /dev/null +++ b/build/stubs/imagick.php @@ -0,0 +1,6744 @@ +Makes an exact copy of the Imagick object + * @link https://php.net/manual/en/class.imagick.php + */ +class Imagick implements Iterator, Countable { + const COLOR_BLACK = 11; + const COLOR_BLUE = 12; + const COLOR_CYAN = 13; + const COLOR_GREEN = 14; + const COLOR_RED = 15; + const COLOR_YELLOW = 16; + const COLOR_MAGENTA = 17; + const COLOR_OPACITY = 18; + const COLOR_ALPHA = 19; + const COLOR_FUZZ = 20; + const IMAGICK_EXTNUM = 30403; + const IMAGICK_EXTVER = "3.4.3"; + const QUANTUM_RANGE = 65535; + const USE_ZEND_MM = 0; + const COMPOSITE_DEFAULT = 40; + const COMPOSITE_UNDEFINED = 0; + const COMPOSITE_NO = 1; + const COMPOSITE_ADD = 2; + const COMPOSITE_ATOP = 3; + const COMPOSITE_BLEND = 4; + const COMPOSITE_BUMPMAP = 5; + const COMPOSITE_CLEAR = 7; + const COMPOSITE_COLORBURN = 8; + const COMPOSITE_COLORDODGE = 9; + const COMPOSITE_COLORIZE = 10; + const COMPOSITE_COPYBLACK = 11; + const COMPOSITE_COPYBLUE = 12; + const COMPOSITE_COPY = 13; + const COMPOSITE_COPYCYAN = 14; + const COMPOSITE_COPYGREEN = 15; + const COMPOSITE_COPYMAGENTA = 16; + const COMPOSITE_COPYOPACITY = 17; + const COMPOSITE_COPYRED = 18; + const COMPOSITE_COPYYELLOW = 19; + const COMPOSITE_DARKEN = 20; + const COMPOSITE_DSTATOP = 21; + const COMPOSITE_DST = 22; + const COMPOSITE_DSTIN = 23; + const COMPOSITE_DSTOUT = 24; + const COMPOSITE_DSTOVER = 25; + const COMPOSITE_DIFFERENCE = 26; + const COMPOSITE_DISPLACE = 27; + const COMPOSITE_DISSOLVE = 28; + const COMPOSITE_EXCLUSION = 29; + const COMPOSITE_HARDLIGHT = 30; + const COMPOSITE_HUE = 31; + const COMPOSITE_IN = 32; + const COMPOSITE_LIGHTEN = 33; + const COMPOSITE_LUMINIZE = 35; + const COMPOSITE_MINUS = 36; + const COMPOSITE_MODULATE = 37; + const COMPOSITE_MULTIPLY = 38; + const COMPOSITE_OUT = 39; + const COMPOSITE_OVER = 40; + const COMPOSITE_OVERLAY = 41; + const COMPOSITE_PLUS = 42; + const COMPOSITE_REPLACE = 43; + const COMPOSITE_SATURATE = 44; + const COMPOSITE_SCREEN = 45; + const COMPOSITE_SOFTLIGHT = 46; + const COMPOSITE_SRCATOP = 47; + const COMPOSITE_SRC = 48; + const COMPOSITE_SRCIN = 49; + const COMPOSITE_SRCOUT = 50; + const COMPOSITE_SRCOVER = 51; + const COMPOSITE_SUBTRACT = 52; + const COMPOSITE_THRESHOLD = 53; + const COMPOSITE_XOR = 54; + const COMPOSITE_CHANGEMASK = 6; + const COMPOSITE_LINEARLIGHT = 34; + const COMPOSITE_DIVIDE = 55; + const COMPOSITE_DISTORT = 56; + const COMPOSITE_BLUR = 57; + const COMPOSITE_PEGTOPLIGHT = 58; + const COMPOSITE_VIVIDLIGHT = 59; + const COMPOSITE_PINLIGHT = 60; + const COMPOSITE_LINEARDODGE = 61; + const COMPOSITE_LINEARBURN = 62; + const COMPOSITE_MATHEMATICS = 63; + const COMPOSITE_MODULUSADD = 2; + const COMPOSITE_MODULUSSUBTRACT = 52; + const COMPOSITE_MINUSDST = 36; + const COMPOSITE_DIVIDEDST = 55; + const COMPOSITE_DIVIDESRC = 64; + const COMPOSITE_MINUSSRC = 65; + const COMPOSITE_DARKENINTENSITY = 66; + const COMPOSITE_LIGHTENINTENSITY = 67; + const MONTAGEMODE_FRAME = 1; + const MONTAGEMODE_UNFRAME = 2; + const MONTAGEMODE_CONCATENATE = 3; + const STYLE_NORMAL = 1; + const STYLE_ITALIC = 2; + const STYLE_OBLIQUE = 3; + const STYLE_ANY = 4; + const FILTER_UNDEFINED = 0; + const FILTER_POINT = 1; + const FILTER_BOX = 2; + const FILTER_TRIANGLE = 3; + const FILTER_HERMITE = 4; + const FILTER_HANNING = 5; + const FILTER_HAMMING = 6; + const FILTER_BLACKMAN = 7; + const FILTER_GAUSSIAN = 8; + const FILTER_QUADRATIC = 9; + const FILTER_CUBIC = 10; + const FILTER_CATROM = 11; + const FILTER_MITCHELL = 12; + const FILTER_LANCZOS = 22; + const FILTER_BESSEL = 13; + const FILTER_SINC = 14; + const FILTER_KAISER = 16; + const FILTER_WELSH = 17; + const FILTER_PARZEN = 18; + const FILTER_LAGRANGE = 21; + const FILTER_SENTINEL = 31; + const FILTER_BOHMAN = 19; + const FILTER_BARTLETT = 20; + const FILTER_JINC = 13; + const FILTER_SINCFAST = 15; + const FILTER_ROBIDOUX = 26; + const FILTER_LANCZOSSHARP = 23; + const FILTER_LANCZOS2 = 24; + const FILTER_LANCZOS2SHARP = 25; + const FILTER_ROBIDOUXSHARP = 27; + const FILTER_COSINE = 28; + const FILTER_SPLINE = 29; + const FILTER_LANCZOSRADIUS = 30; + const IMGTYPE_UNDEFINED = 0; + const IMGTYPE_BILEVEL = 1; + const IMGTYPE_GRAYSCALE = 2; + const IMGTYPE_GRAYSCALEMATTE = 3; + const IMGTYPE_PALETTE = 4; + const IMGTYPE_PALETTEMATTE = 5; + const IMGTYPE_TRUECOLOR = 6; + const IMGTYPE_TRUECOLORMATTE = 7; + const IMGTYPE_COLORSEPARATION = 8; + const IMGTYPE_COLORSEPARATIONMATTE = 9; + const IMGTYPE_OPTIMIZE = 10; + const IMGTYPE_PALETTEBILEVELMATTE = 11; + const RESOLUTION_UNDEFINED = 0; + const RESOLUTION_PIXELSPERINCH = 1; + const RESOLUTION_PIXELSPERCENTIMETER = 2; + const COMPRESSION_UNDEFINED = 0; + const COMPRESSION_NO = 1; + const COMPRESSION_BZIP = 2; + const COMPRESSION_FAX = 6; + const COMPRESSION_GROUP4 = 7; + const COMPRESSION_JPEG = 8; + const COMPRESSION_JPEG2000 = 9; + const COMPRESSION_LOSSLESSJPEG = 10; + const COMPRESSION_LZW = 11; + const COMPRESSION_RLE = 12; + const COMPRESSION_ZIP = 13; + const COMPRESSION_DXT1 = 3; + const COMPRESSION_DXT3 = 4; + const COMPRESSION_DXT5 = 5; + const COMPRESSION_ZIPS = 14; + const COMPRESSION_PIZ = 15; + const COMPRESSION_PXR24 = 16; + const COMPRESSION_B44 = 17; + const COMPRESSION_B44A = 18; + const COMPRESSION_LZMA = 19; + const COMPRESSION_JBIG1 = 20; + const COMPRESSION_JBIG2 = 21; + const PAINT_POINT = 1; + const PAINT_REPLACE = 2; + const PAINT_FLOODFILL = 3; + const PAINT_FILLTOBORDER = 4; + const PAINT_RESET = 5; + const GRAVITY_NORTHWEST = 1; + const GRAVITY_NORTH = 2; + const GRAVITY_NORTHEAST = 3; + const GRAVITY_WEST = 4; + const GRAVITY_CENTER = 5; + const GRAVITY_EAST = 6; + const GRAVITY_SOUTHWEST = 7; + const GRAVITY_SOUTH = 8; + const GRAVITY_SOUTHEAST = 9; + const GRAVITY_FORGET = 0; + const GRAVITY_STATIC = 10; + const STRETCH_NORMAL = 1; + const STRETCH_ULTRACONDENSED = 2; + const STRETCH_EXTRACONDENSED = 3; + const STRETCH_CONDENSED = 4; + const STRETCH_SEMICONDENSED = 5; + const STRETCH_SEMIEXPANDED = 6; + const STRETCH_EXPANDED = 7; + const STRETCH_EXTRAEXPANDED = 8; + const STRETCH_ULTRAEXPANDED = 9; + const STRETCH_ANY = 10; + const ALIGN_UNDEFINED = 0; + const ALIGN_LEFT = 1; + const ALIGN_CENTER = 2; + const ALIGN_RIGHT = 3; + const DECORATION_NO = 1; + const DECORATION_UNDERLINE = 2; + const DECORATION_OVERLINE = 3; + const DECORATION_LINETROUGH = 4; + const DECORATION_LINETHROUGH = 4; + const NOISE_UNIFORM = 1; + const NOISE_GAUSSIAN = 2; + const NOISE_MULTIPLICATIVEGAUSSIAN = 3; + const NOISE_IMPULSE = 4; + const NOISE_LAPLACIAN = 5; + const NOISE_POISSON = 6; + const NOISE_RANDOM = 7; + const CHANNEL_UNDEFINED = 0; + const CHANNEL_RED = 1; + const CHANNEL_GRAY = 1; + const CHANNEL_CYAN = 1; + const CHANNEL_GREEN = 2; + const CHANNEL_MAGENTA = 2; + const CHANNEL_BLUE = 4; + const CHANNEL_YELLOW = 4; + const CHANNEL_ALPHA = 8; + const CHANNEL_OPACITY = 8; + const CHANNEL_MATTE = 8; + const CHANNEL_BLACK = 32; + const CHANNEL_INDEX = 32; + const CHANNEL_ALL = 134217727; + const CHANNEL_DEFAULT = 134217719; + const CHANNEL_RGBA = 15; + const CHANNEL_TRUEALPHA = 64; + const CHANNEL_RGBS = 128; + const CHANNEL_GRAY_CHANNELS = 128; + const CHANNEL_SYNC = 256; + const CHANNEL_COMPOSITES = 47; + const METRIC_UNDEFINED = 0; + const METRIC_ABSOLUTEERRORMETRIC = 1; + const METRIC_MEANABSOLUTEERROR = 2; + const METRIC_MEANERRORPERPIXELMETRIC = 3; + const METRIC_MEANSQUAREERROR = 4; + const METRIC_PEAKABSOLUTEERROR = 5; + const METRIC_PEAKSIGNALTONOISERATIO = 6; + const METRIC_ROOTMEANSQUAREDERROR = 7; + const METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC = 8; + const METRIC_FUZZERROR = 9; + const PIXEL_CHAR = 1; + const PIXEL_DOUBLE = 2; + const PIXEL_FLOAT = 3; + const PIXEL_INTEGER = 4; + const PIXEL_LONG = 5; + const PIXEL_QUANTUM = 6; + const PIXEL_SHORT = 7; + const EVALUATE_UNDEFINED = 0; + const EVALUATE_ADD = 1; + const EVALUATE_AND = 2; + const EVALUATE_DIVIDE = 3; + const EVALUATE_LEFTSHIFT = 4; + const EVALUATE_MAX = 5; + const EVALUATE_MIN = 6; + const EVALUATE_MULTIPLY = 7; + const EVALUATE_OR = 8; + const EVALUATE_RIGHTSHIFT = 9; + const EVALUATE_SET = 10; + const EVALUATE_SUBTRACT = 11; + const EVALUATE_XOR = 12; + const EVALUATE_POW = 13; + const EVALUATE_LOG = 14; + const EVALUATE_THRESHOLD = 15; + const EVALUATE_THRESHOLDBLACK = 16; + const EVALUATE_THRESHOLDWHITE = 17; + const EVALUATE_GAUSSIANNOISE = 18; + const EVALUATE_IMPULSENOISE = 19; + const EVALUATE_LAPLACIANNOISE = 20; + const EVALUATE_MULTIPLICATIVENOISE = 21; + const EVALUATE_POISSONNOISE = 22; + const EVALUATE_UNIFORMNOISE = 23; + const EVALUATE_COSINE = 24; + const EVALUATE_SINE = 25; + const EVALUATE_ADDMODULUS = 26; + const EVALUATE_MEAN = 27; + const EVALUATE_ABS = 28; + const EVALUATE_EXPONENTIAL = 29; + const EVALUATE_MEDIAN = 30; + const EVALUATE_SUM = 31; + const COLORSPACE_UNDEFINED = 0; + const COLORSPACE_RGB = 1; + const COLORSPACE_GRAY = 2; + const COLORSPACE_TRANSPARENT = 3; + const COLORSPACE_OHTA = 4; + const COLORSPACE_LAB = 5; + const COLORSPACE_XYZ = 6; + const COLORSPACE_YCBCR = 7; + const COLORSPACE_YCC = 8; + const COLORSPACE_YIQ = 9; + const COLORSPACE_YPBPR = 10; + const COLORSPACE_YUV = 11; + const COLORSPACE_CMYK = 12; + const COLORSPACE_SRGB = 13; + const COLORSPACE_HSB = 14; + const COLORSPACE_HSL = 15; + const COLORSPACE_HWB = 16; + const COLORSPACE_REC601LUMA = 17; + const COLORSPACE_REC709LUMA = 19; + const COLORSPACE_LOG = 21; + const COLORSPACE_CMY = 22; + const COLORSPACE_LUV = 23; + const COLORSPACE_HCL = 24; + const COLORSPACE_LCH = 25; + const COLORSPACE_LMS = 26; + const COLORSPACE_LCHAB = 27; + const COLORSPACE_LCHUV = 28; + const COLORSPACE_SCRGB = 29; + const COLORSPACE_HSI = 30; + const COLORSPACE_HSV = 31; + const COLORSPACE_HCLP = 32; + const COLORSPACE_YDBDR = 33; + const COLORSPACE_REC601YCBCR = 18; + const COLORSPACE_REC709YCBCR = 20; + const VIRTUALPIXELMETHOD_UNDEFINED = 0; + const VIRTUALPIXELMETHOD_BACKGROUND = 1; + const VIRTUALPIXELMETHOD_CONSTANT = 2; + const VIRTUALPIXELMETHOD_EDGE = 4; + const VIRTUALPIXELMETHOD_MIRROR = 5; + const VIRTUALPIXELMETHOD_TILE = 7; + const VIRTUALPIXELMETHOD_TRANSPARENT = 8; + const VIRTUALPIXELMETHOD_MASK = 9; + const VIRTUALPIXELMETHOD_BLACK = 10; + const VIRTUALPIXELMETHOD_GRAY = 11; + const VIRTUALPIXELMETHOD_WHITE = 12; + const VIRTUALPIXELMETHOD_HORIZONTALTILE = 13; + const VIRTUALPIXELMETHOD_VERTICALTILE = 14; + const VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE = 15; + const VIRTUALPIXELMETHOD_VERTICALTILEEDGE = 16; + const VIRTUALPIXELMETHOD_CHECKERTILE = 17; + const PREVIEW_UNDEFINED = 0; + const PREVIEW_ROTATE = 1; + const PREVIEW_SHEAR = 2; + const PREVIEW_ROLL = 3; + const PREVIEW_HUE = 4; + const PREVIEW_SATURATION = 5; + const PREVIEW_BRIGHTNESS = 6; + const PREVIEW_GAMMA = 7; + const PREVIEW_SPIFF = 8; + const PREVIEW_DULL = 9; + const PREVIEW_GRAYSCALE = 10; + const PREVIEW_QUANTIZE = 11; + const PREVIEW_DESPECKLE = 12; + const PREVIEW_REDUCENOISE = 13; + const PREVIEW_ADDNOISE = 14; + const PREVIEW_SHARPEN = 15; + const PREVIEW_BLUR = 16; + const PREVIEW_THRESHOLD = 17; + const PREVIEW_EDGEDETECT = 18; + const PREVIEW_SPREAD = 19; + const PREVIEW_SOLARIZE = 20; + const PREVIEW_SHADE = 21; + const PREVIEW_RAISE = 22; + const PREVIEW_SEGMENT = 23; + const PREVIEW_SWIRL = 24; + const PREVIEW_IMPLODE = 25; + const PREVIEW_WAVE = 26; + const PREVIEW_OILPAINT = 27; + const PREVIEW_CHARCOALDRAWING = 28; + const PREVIEW_JPEG = 29; + const RENDERINGINTENT_UNDEFINED = 0; + const RENDERINGINTENT_SATURATION = 1; + const RENDERINGINTENT_PERCEPTUAL = 2; + const RENDERINGINTENT_ABSOLUTE = 3; + const RENDERINGINTENT_RELATIVE = 4; + const INTERLACE_UNDEFINED = 0; + const INTERLACE_NO = 1; + const INTERLACE_LINE = 2; + const INTERLACE_PLANE = 3; + const INTERLACE_PARTITION = 4; + const INTERLACE_GIF = 5; + const INTERLACE_JPEG = 6; + const INTERLACE_PNG = 7; + const FILLRULE_UNDEFINED = 0; + const FILLRULE_EVENODD = 1; + const FILLRULE_NONZERO = 2; + const PATHUNITS_UNDEFINED = 0; + const PATHUNITS_USERSPACE = 1; + const PATHUNITS_USERSPACEONUSE = 2; + const PATHUNITS_OBJECTBOUNDINGBOX = 3; + const LINECAP_UNDEFINED = 0; + const LINECAP_BUTT = 1; + const LINECAP_ROUND = 2; + const LINECAP_SQUARE = 3; + const LINEJOIN_UNDEFINED = 0; + const LINEJOIN_MITER = 1; + const LINEJOIN_ROUND = 2; + const LINEJOIN_BEVEL = 3; + const RESOURCETYPE_UNDEFINED = 0; + const RESOURCETYPE_AREA = 1; + const RESOURCETYPE_DISK = 2; + const RESOURCETYPE_FILE = 3; + const RESOURCETYPE_MAP = 4; + const RESOURCETYPE_MEMORY = 5; + const RESOURCETYPE_TIME = 7; + const RESOURCETYPE_THROTTLE = 8; + const RESOURCETYPE_THREAD = 6; + const DISPOSE_UNRECOGNIZED = 0; + const DISPOSE_UNDEFINED = 0; + const DISPOSE_NONE = 1; + const DISPOSE_BACKGROUND = 2; + const DISPOSE_PREVIOUS = 3; + const INTERPOLATE_UNDEFINED = 0; + const INTERPOLATE_AVERAGE = 1; + const INTERPOLATE_BICUBIC = 2; + const INTERPOLATE_BILINEAR = 3; + const INTERPOLATE_FILTER = 4; + const INTERPOLATE_INTEGER = 5; + const INTERPOLATE_MESH = 6; + const INTERPOLATE_NEARESTNEIGHBOR = 7; + const INTERPOLATE_SPLINE = 8; + const LAYERMETHOD_UNDEFINED = 0; + const LAYERMETHOD_COALESCE = 1; + const LAYERMETHOD_COMPAREANY = 2; + const LAYERMETHOD_COMPARECLEAR = 3; + const LAYERMETHOD_COMPAREOVERLAY = 4; + const LAYERMETHOD_DISPOSE = 5; + const LAYERMETHOD_OPTIMIZE = 6; + const LAYERMETHOD_OPTIMIZEPLUS = 8; + const LAYERMETHOD_OPTIMIZETRANS = 9; + const LAYERMETHOD_COMPOSITE = 12; + const LAYERMETHOD_OPTIMIZEIMAGE = 7; + const LAYERMETHOD_REMOVEDUPS = 10; + const LAYERMETHOD_REMOVEZERO = 11; + const LAYERMETHOD_TRIMBOUNDS = 16; + const ORIENTATION_UNDEFINED = 0; + const ORIENTATION_TOPLEFT = 1; + const ORIENTATION_TOPRIGHT = 2; + const ORIENTATION_BOTTOMRIGHT = 3; + const ORIENTATION_BOTTOMLEFT = 4; + const ORIENTATION_LEFTTOP = 5; + const ORIENTATION_RIGHTTOP = 6; + const ORIENTATION_RIGHTBOTTOM = 7; + const ORIENTATION_LEFTBOTTOM = 8; + const DISTORTION_UNDEFINED = 0; + const DISTORTION_AFFINE = 1; + const DISTORTION_AFFINEPROJECTION = 2; + const DISTORTION_ARC = 9; + const DISTORTION_BILINEAR = 6; + const DISTORTION_PERSPECTIVE = 4; + const DISTORTION_PERSPECTIVEPROJECTION = 5; + const DISTORTION_SCALEROTATETRANSLATE = 3; + const DISTORTION_POLYNOMIAL = 8; + const DISTORTION_POLAR = 10; + const DISTORTION_DEPOLAR = 11; + const DISTORTION_BARREL = 14; + const DISTORTION_SHEPARDS = 16; + const DISTORTION_SENTINEL = 18; + const DISTORTION_BARRELINVERSE = 15; + const DISTORTION_BILINEARFORWARD = 6; + const DISTORTION_BILINEARREVERSE = 7; + const DISTORTION_RESIZE = 17; + const DISTORTION_CYLINDER2PLANE = 12; + const DISTORTION_PLANE2CYLINDER = 13; + const LAYERMETHOD_MERGE = 13; + const LAYERMETHOD_FLATTEN = 14; + const LAYERMETHOD_MOSAIC = 15; + const ALPHACHANNEL_ACTIVATE = 1; + const ALPHACHANNEL_RESET = 7; + const ALPHACHANNEL_SET = 8; + const ALPHACHANNEL_UNDEFINED = 0; + const ALPHACHANNEL_COPY = 3; + const ALPHACHANNEL_DEACTIVATE = 4; + const ALPHACHANNEL_EXTRACT = 5; + const ALPHACHANNEL_OPAQUE = 6; + const ALPHACHANNEL_SHAPE = 9; + const ALPHACHANNEL_TRANSPARENT = 10; + const SPARSECOLORMETHOD_UNDEFINED = 0; + const SPARSECOLORMETHOD_BARYCENTRIC = 1; + const SPARSECOLORMETHOD_BILINEAR = 7; + const SPARSECOLORMETHOD_POLYNOMIAL = 8; + const SPARSECOLORMETHOD_SPEPARDS = 16; + const SPARSECOLORMETHOD_VORONOI = 18; + const SPARSECOLORMETHOD_INVERSE = 19; + const DITHERMETHOD_UNDEFINED = 0; + const DITHERMETHOD_NO = 1; + const DITHERMETHOD_RIEMERSMA = 2; + const DITHERMETHOD_FLOYDSTEINBERG = 3; + const FUNCTION_UNDEFINED = 0; + const FUNCTION_POLYNOMIAL = 1; + const FUNCTION_SINUSOID = 2; + const ALPHACHANNEL_BACKGROUND = 2; + const FUNCTION_ARCSIN = 3; + const FUNCTION_ARCTAN = 4; + const ALPHACHANNEL_FLATTEN = 11; + const ALPHACHANNEL_REMOVE = 12; + const STATISTIC_GRADIENT = 1; + const STATISTIC_MAXIMUM = 2; + const STATISTIC_MEAN = 3; + const STATISTIC_MEDIAN = 4; + const STATISTIC_MINIMUM = 5; + const STATISTIC_MODE = 6; + const STATISTIC_NONPEAK = 7; + const STATISTIC_STANDARD_DEVIATION = 8; + const MORPHOLOGY_CONVOLVE = 1; + const MORPHOLOGY_CORRELATE = 2; + const MORPHOLOGY_ERODE = 3; + const MORPHOLOGY_DILATE = 4; + const MORPHOLOGY_ERODE_INTENSITY = 5; + const MORPHOLOGY_DILATE_INTENSITY = 6; + const MORPHOLOGY_DISTANCE = 7; + const MORPHOLOGY_OPEN = 8; + const MORPHOLOGY_CLOSE = 9; + const MORPHOLOGY_OPEN_INTENSITY = 10; + const MORPHOLOGY_CLOSE_INTENSITY = 11; + const MORPHOLOGY_SMOOTH = 12; + const MORPHOLOGY_EDGE_IN = 13; + const MORPHOLOGY_EDGE_OUT = 14; + const MORPHOLOGY_EDGE = 15; + const MORPHOLOGY_TOP_HAT = 16; + const MORPHOLOGY_BOTTOM_HAT = 17; + const MORPHOLOGY_HIT_AND_MISS = 18; + const MORPHOLOGY_THINNING = 19; + const MORPHOLOGY_THICKEN = 20; + const MORPHOLOGY_VORONOI = 21; + const MORPHOLOGY_ITERATIVE = 22; + const KERNEL_UNITY = 1; + const KERNEL_GAUSSIAN = 2; + const KERNEL_DIFFERENCE_OF_GAUSSIANS = 3; + const KERNEL_LAPLACIAN_OF_GAUSSIANS = 4; + const KERNEL_BLUR = 5; + const KERNEL_COMET = 6; + const KERNEL_LAPLACIAN = 7; + const KERNEL_SOBEL = 8; + const KERNEL_FREI_CHEN = 9; + const KERNEL_ROBERTS = 10; + const KERNEL_PREWITT = 11; + const KERNEL_COMPASS = 12; + const KERNEL_KIRSCH = 13; + const KERNEL_DIAMOND = 14; + const KERNEL_SQUARE = 15; + const KERNEL_RECTANGLE = 16; + const KERNEL_OCTAGON = 17; + const KERNEL_DISK = 18; + const KERNEL_PLUS = 19; + const KERNEL_CROSS = 20; + const KERNEL_RING = 21; + const KERNEL_PEAKS = 22; + const KERNEL_EDGES = 23; + const KERNEL_CORNERS = 24; + const KERNEL_DIAGONALS = 25; + const KERNEL_LINE_ENDS = 26; + const KERNEL_LINE_JUNCTIONS = 27; + const KERNEL_RIDGES = 28; + const KERNEL_CONVEX_HULL = 29; + const KERNEL_THIN_SE = 30; + const KERNEL_SKELETON = 31; + const KERNEL_CHEBYSHEV = 32; + const KERNEL_MANHATTAN = 33; + const KERNEL_OCTAGONAL = 34; + const KERNEL_EUCLIDEAN = 35; + const KERNEL_USER_DEFINED = 36; + const KERNEL_BINOMIAL = 37; + const DIRECTION_LEFT_TO_RIGHT = 2; + const DIRECTION_RIGHT_TO_LEFT = 1; + const NORMALIZE_KERNEL_NONE = 0; + const NORMALIZE_KERNEL_VALUE = 8192; + const NORMALIZE_KERNEL_CORRELATE = 65536; + const NORMALIZE_KERNEL_PERCENT = 4096; + + /** + * (PECL imagick 2.0.0)
+ * Removes repeated portions of images to optimize + * @link https://php.net/manual/en/imagick.optimizeimagelayers.php + * @return bool TRUE on success. + */ + public function optimizeImageLayers () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the maximum bounding region between images + * @link https://php.net/manual/en/imagick.compareimagelayers.php + * @param int $method

+ * One of the layer method constants. + *

+ * @return Imagick TRUE on success. + */ + public function compareImageLayers ($method) {} + + /** + * (PECL imagick 2.0.0)
+ * Quickly fetch attributes + * @link https://php.net/manual/en/imagick.pingimageblob.php + * @param string $image

+ * A string containing the image. + *

+ * @return bool TRUE on success. + */ + public function pingImageBlob ($image) {} + + /** + * (PECL imagick 2.0.0)
+ * Get basic image attributes in a lightweight manner + * @link https://php.net/manual/en/imagick.pingimagefile.php + * @param resource $filehandle

+ * An open filehandle to the image. + *

+ * @param string $fileName [optional]

+ * Optional filename for this image. + *

+ * @return bool TRUE on success. + */ + public function pingImageFile ($filehandle, $fileName = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a vertical mirror image + * @link https://php.net/manual/en/imagick.transposeimage.php + * @return bool TRUE on success. + */ + public function transposeImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a horizontal mirror image + * @link https://php.net/manual/en/imagick.transverseimage.php + * @return bool TRUE on success. + */ + public function transverseImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Remove edges from the image + * @link https://php.net/manual/en/imagick.trimimage.php + * @param float $fuzz

+ * By default target must match a particular pixel color exactly. + * However, in many cases two colors may differ by a small amount. + * The fuzz member of image defines how much tolerance is acceptable + * to consider two colors as the same. This parameter represents the variation + * on the quantum range. + *

+ * @return bool TRUE on success. + */ + public function trimImage ($fuzz) {} + + /** + * (PECL imagick 2.0.0)
+ * Applies wave filter to the image + * @link https://php.net/manual/en/imagick.waveimage.php + * @param float $amplitude

+ * The amplitude of the wave. + *

+ * @param float $length

+ * The length of the wave. + *

+ * @return bool TRUE on success. + */ + public function waveImage ($amplitude, $length) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds vignette filter to the image + * @link https://php.net/manual/en/imagick.vignetteimage.php + * @param float $blackPoint

+ * The black point. + *

+ * @param float $whitePoint

+ * The white point + *

+ * @param int $x

+ * X offset of the ellipse + *

+ * @param int $y

+ * Y offset of the ellipse + *

+ * @return bool TRUE on success. + */ + public function vignetteImage ($blackPoint, $whitePoint, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Discards all but one of any pixel color + * @link https://php.net/manual/en/imagick.uniqueimagecolors.php + * @return bool TRUE on success. + */ + public function uniqueImageColors () {} + + /** + * (PECL imagick 2.0.0)
+ * Return if the image has a matte channel + * @link https://php.net/manual/en/imagick.getimagematte.php + * @return bool TRUE on success or FALSE on failure. + */ + public function getImageMatte () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image matte channel + * @link https://php.net/manual/en/imagick.setimagematte.php + * @param bool $matte

+ * True activates the matte channel and false disables it. + *

+ * @return bool TRUE on success. + */ + public function setImageMatte ($matte) {} + + /** + * Adaptively resize image with data dependent triangulation + * + * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
+ * If false, the calculations should produce the same results as ImageMagick CLI does.
+ *
+ * Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. + * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @link https://php.net/manual/en/imagick.adaptiveresizeimage.php + * @param int $columns The number of columns in the scaled image. + * @param int $rows The number of rows in the scaled image. + * @param bool $bestfit [optional] Whether to fit the image inside a bounding box.
+ * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function adaptiveResizeImage ($columns, $rows, $bestfit = false, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates a pencil sketch + * @link https://php.net/manual/en/imagick.sketchimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels. + *

+ * @param float $angle

+ * Apply the effect along this angle. + *

+ * @return bool TRUE on success. + */ + public function sketchImage ($radius, $sigma, $angle) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a 3D effect + * @link https://php.net/manual/en/imagick.shadeimage.php + * @param bool $gray

+ * A value other than zero shades the intensity of each pixel. + *

+ * @param float $azimuth

+ * Defines the light source direction. + *

+ * @param float $elevation

+ * Defines the light source direction. + *

+ * @return bool TRUE on success. + */ + public function shadeImage ($gray, $azimuth, $elevation) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the size offset + * @link https://php.net/manual/en/imagick.getsizeoffset.php + * @return int the size offset associated with the Imagick object. + */ + public function getSizeOffset () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the size and offset of the Imagick object + * @link https://php.net/manual/en/imagick.setsizeoffset.php + * @param int $columns

+ * The width in pixels. + *

+ * @param int $rows

+ * The height in pixels. + *

+ * @param int $offset

+ * The image offset. + *

+ * @return bool TRUE on success. + */ + public function setSizeOffset ($columns, $rows, $offset) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds adaptive blur filter to image + * @link https://php.net/manual/en/imagick.adaptiveblurimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel. + * Provide a value of 0 and the radius will be chosen automagically. + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function adaptiveBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)
+ * Enhances the contrast of a color image + * @link https://php.net/manual/en/imagick.contraststretchimage.php + * @param float $black_point

+ * The black point. + *

+ * @param float $white_point

+ * The white point. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Imagick::CHANNEL_ALL. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function contrastStretchImage ($black_point, $white_point, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Adaptively sharpen the image + * @link https://php.net/manual/en/imagick.adaptivesharpenimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select. + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function adaptiveSharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a high-contrast, two-color image + * @link https://php.net/manual/en/imagick.randomthresholdimage.php + * @param float $low

+ * The low point + *

+ * @param float $high

+ * The high point + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function randomThresholdImage ($low, $high, $channel = Imagick::CHANNEL_ALL) {} + + /** + * @param $xRounding + * @param $yRounding + * @param $strokeWidth [optional] + * @param $displace [optional] + * @param $sizeCorrection [optional] + */ + public function roundCornersImage ($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection) {} + + /** + * (PECL imagick 2.0.0)
+ * Rounds image corners + * @link https://php.net/manual/en/imagick.roundcorners.php + * @param float $x_rounding

+ * x rounding + *

+ * @param float $y_rounding

+ * y rounding + *

+ * @param float $stroke_width [optional]

+ * stroke width + *

+ * @param float $displace [optional]

+ * image displace + *

+ * @param float $size_correction [optional]

+ * size correction + *

+ * @return bool TRUE on success. + */ + public function roundCorners ($x_rounding, $y_rounding, $stroke_width = 10.0, $displace = 5.0, $size_correction = -6.0) {} + + /** + * (PECL imagick 2.0.0)
+ * Set the iterator position + * @link https://php.net/manual/en/imagick.setiteratorindex.php + * @param int $index

+ * The position to set the iterator to + *

+ * @return bool TRUE on success. + */ + public function setIteratorIndex ($index) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the index of the current active image + * @link https://php.net/manual/en/imagick.getiteratorindex.php + * @return int an integer containing the index of the image in the stack. + */ + public function getIteratorIndex () {} + + /** + * (PECL imagick 2.0.0)
+ * Convenience method for setting crop size and the image geometry + * @link https://php.net/manual/en/imagick.transformimage.php + * @param string $crop

+ * A crop geometry string. This geometry defines a subregion of the image to crop. + *

+ * @param string $geometry

+ * An image geometry string. This geometry defines the final size of the image. + *

+ * @return Imagick TRUE on success. + */ + public function transformImage ($crop, $geometry) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image opacity level + * @link https://php.net/manual/en/imagick.setimageopacity.php + * @param float $opacity

+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *

+ * @return bool TRUE on success. + */ + public function setImageOpacity ($opacity) {} + + /** + * (PECL imagick 2.2.2)
+ * Performs an ordered dither + * @link https://php.net/manual/en/imagick.orderedposterizeimage.php + * @param string $threshold_map

+ * A string containing the name of the threshold dither map to use + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function orderedPosterizeImage ($threshold_map, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates a Polaroid picture + * @link https://php.net/manual/en/imagick.polaroidimage.php + * @param ImagickDraw $properties

+ * The polaroid properties + *

+ * @param float $angle

+ * The polaroid angle + *

+ * @return bool TRUE on success. + */ + public function polaroidImage (ImagickDraw $properties, $angle) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the named image property + * @link https://php.net/manual/en/imagick.getimageproperty.php + * @param string $name

+ * name of the property (for example Exif:DateTime) + *

+ * @return string|false a string containing the image property, false if a + * property with the given name does not exist. + */ + public function getImageProperty ($name) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets an image property + * @link https://php.net/manual/en/imagick.setimageproperty.php + * @param string $name + * @param string $value + * @return bool TRUE on success. + */ + public function setImageProperty ($name, $value) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image interpolate pixel method + * @link https://php.net/manual/en/imagick.setimageinterpolatemethod.php + * @param int $method

+ * The method is one of the Imagick::INTERPOLATE_* constants + *

+ * @return bool TRUE on success. + */ + public function setImageInterpolateMethod ($method) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the interpolation method + * @link https://php.net/manual/en/imagick.getimageinterpolatemethod.php + * @return int the interpolate method on success. + */ + public function getImageInterpolateMethod () {} + + /** + * (PECL imagick 2.0.0)
+ * Stretches with saturation the image intensity + * @link https://php.net/manual/en/imagick.linearstretchimage.php + * @param float $blackPoint

+ * The image black point + *

+ * @param float $whitePoint

+ * The image white point + *

+ * @return bool TRUE on success. + */ + public function linearStretchImage ($blackPoint, $whitePoint) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image length in bytes + * @link https://php.net/manual/en/imagick.getimagelength.php + * @return int an int containing the current image size. + */ + public function getImageLength () {} + + /** + * (No version information available, might only be in SVN)
+ * Set image size + * @link https://php.net/manual/en/imagick.extentimage.php + * @param int $width

+ * The new width + *

+ * @param int $height

+ * The new height + *

+ * @param int $x

+ * X position for the new size + *

+ * @param int $y

+ * Y position for the new size + *

+ * @return bool TRUE on success. + */ + public function extentImage ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image orientation + * @link https://php.net/manual/en/imagick.getimageorientation.php + * @return int an int on success. + */ + public function getImageOrientation () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image orientation + * @link https://php.net/manual/en/imagick.setimageorientation.php + * @param int $orientation

+ * One of the orientation constants + *

+ * @return bool TRUE on success. + */ + public function setImageOrientation ($orientation) {} + + /** + * (PECL imagick 2.1.0)
+ * Changes the color value of any pixel that matches target + * @link https://php.net/manual/en/imagick.paintfloodfillimage.php + * @param mixed $fill

+ * ImagickPixel object or a string containing the fill color + *

+ * @param float $fuzz

+ * The amount of fuzz. For example, set fuzz to 10 and the color red at + * intensities of 100 and 102 respectively are now interpreted as the + * same color for the purposes of the floodfill. + *

+ * @param mixed $bordercolor

+ * ImagickPixel object or a string containing the border color + *

+ * @param int $x

+ * X start position of the floodfill + *

+ * @param int $y

+ * Y start position of the floodfill + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function paintFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Replaces colors in the image from a color lookup table. Optional second parameter to replace colors in a specific channel. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer. + * @link https://php.net/manual/en/imagick.clutimage.php + * @param Imagick $lookup_table

+ * Imagick object containing the color lookup table + *

+ * @param int $channel [optional]

+ * The Channeltype + * constant. When not supplied, default channels are replaced. + *

+ * @return bool TRUE on success. + * @since 2.0.0 + */ + public function clutImage (Imagick $lookup_table, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image properties + * @link https://php.net/manual/en/imagick.getimageproperties.php + * @param string $pattern [optional]

+ * The pattern for property names. + *

+ * @param bool $only_names [optional]

+ * Whether to return only property names. If FALSE then also the values are returned + *

+ * @return array an array containing the image properties or property names. + */ + public function getImageProperties ($pattern = "*", $only_names = true) {} + + /** + * (PECL imagick 2.2.0)
+ * Returns the image profiles + * @link https://php.net/manual/en/imagick.getimageprofiles.php + * @param string $pattern [optional]

+ * The pattern for profile names. + *

+ * @param bool $include_values [optional]

+ * Whether to return only profile names. If FALSE then only profile names will be returned. + *

+ * @return array an array containing the image profiles or profile names. + */ + public function getImageProfiles ($pattern = "*", $include_values = true) {} + + /** + * (PECL imagick 2.0.1)
+ * Distorts an image using various distortion methods + * @link https://php.net/manual/en/imagick.distortimage.php + * @param int $method

+ * The method of image distortion. See distortion constants + *

+ * @param array $arguments

+ * The arguments for this distortion method + *

+ * @param bool $bestfit

+ * Attempt to resize destination to fit distorted source + *

+ * @return bool TRUE on success. + */ + public function distortImage ($method, array $arguments, $bestfit) {} + + /** + * (No version information available, might only be in SVN)
+ * Writes an image to a filehandle + * @link https://php.net/manual/en/imagick.writeimagefile.php + * @param resource $filehandle

+ * Filehandle where to write the image + *

+ * @return bool TRUE on success. + */ + public function writeImageFile ($filehandle) {} + + /** + * (No version information available, might only be in SVN)
+ * Writes frames to a filehandle + * @link https://php.net/manual/en/imagick.writeimagesfile.php + * @param resource $filehandle

+ * Filehandle where to write the images + *

+ * @return bool TRUE on success. + */ + public function writeImagesFile ($filehandle) {} + + /** + * (No version information available, might only be in SVN)
+ * Reset image page + * @link https://php.net/manual/en/imagick.resetimagepage.php + * @param string $page

+ * The page definition. For example 7168x5147+0+0 + *

+ * @return bool TRUE on success. + */ + public function resetImagePage ($page) {} + + /** + * (No version information available, might only be in SVN)
+ * Sets image clip mask + * @link https://php.net/manual/en/imagick.setimageclipmask.php + * @param Imagick $clip_mask

+ * The Imagick object containing the clip mask + *

+ * @return bool TRUE on success. + */ + public function setImageClipMask (Imagick $clip_mask) {} + + /** + * (No version information available, might only be in SVN)
+ * Gets image clip mask + * @link https://php.net/manual/en/imagick.getimageclipmask.php + * @return Imagick an Imagick object containing the clip mask. + */ + public function getImageClipMask () {} + + /** + * (No version information available, might only be in SVN)
+ * Animates an image or images + * @link https://php.net/manual/en/imagick.animateimages.php + * @param string $x_server

+ * X server address + *

+ * @return bool TRUE on success. + */ + public function animateImages ($x_server) {} + + /** + * (No version information available, might only be in SVN)
+ * Recolors image + * @link https://php.net/manual/en/imagick.recolorimage.php + * @param array $matrix

+ * The matrix containing the color values + *

+ * @return bool TRUE on success. + */ + public function recolorImage (array $matrix) {} + + /** + * (PECL imagick 2.1.0)
+ * Sets font + * @link https://php.net/manual/en/imagick.setfont.php + * @param string $font

+ * Font name or a filename + *

+ * @return bool TRUE on success. + */ + public function setFont ($font) {} + + /** + * (PECL imagick 2.1.0)
+ * Gets font + * @link https://php.net/manual/en/imagick.getfont.php + * @return string|false the string containing the font name or FALSE if not font is set. + */ + public function getFont () {} + + /** + * (PECL imagick 2.1.0)
+ * Sets point size + * @link https://php.net/manual/en/imagick.setpointsize.php + * @param float $point_size

+ * Point size + *

+ * @return bool TRUE on success. + */ + public function setPointSize ($point_size) {} + + /** + * (No version information available, might only be in SVN)
+ * Gets point size + * @link https://php.net/manual/en/imagick.getpointsize.php + * @return float a float containing the point size. + */ + public function getPointSize () {} + + /** + * (PECL imagick 2.1.0)
+ * Merges image layers + * @link https://php.net/manual/en/imagick.mergeimagelayers.php + * @param int $layer_method

+ * One of the Imagick::LAYERMETHOD_* constants + *

+ * @return Imagick Returns an Imagick object containing the merged image. + * @throws ImagickException + */ + public function mergeImageLayers ($layer_method) {} + + /** + * (No version information available, might only be in SVN)
+ * Sets image alpha channel + * @link https://php.net/manual/en/imagick.setimagealphachannel.php + * @param int $mode

+ * One of the Imagick::ALPHACHANNEL_* constants + *

+ * @return bool TRUE on success. + */ + public function setImageAlphaChannel ($mode) {} + + /** + * (No version information available, might only be in SVN)
+ * Changes the color value of any pixel that matches target + * @link https://php.net/manual/en/imagick.floodfillpaintimage.php + * @param mixed $fill

+ * ImagickPixel object or a string containing the fill color + *

+ * @param float $fuzz

+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *

+ * @param mixed $target

+ * ImagickPixel object or a string containing the target color to paint + *

+ * @param int $x

+ * X start position of the floodfill + *

+ * @param int $y

+ * Y start position of the floodfill + *

+ * @param bool $invert

+ * If TRUE paints any pixel that does not match the target color. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function floodFillPaintImage ($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)
+ * Changes the color value of any pixel that matches target + * @link https://php.net/manual/en/imagick.opaquepaintimage.php + * @param mixed $target

+ * ImagickPixel object or a string containing the color to change + *

+ * @param mixed $fill

+ * The replacement color + *

+ * @param float $fuzz

+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *

+ * @param bool $invert

+ * If TRUE paints any pixel that does not match the target color. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function opaquePaintImage ($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)
+ * Paints pixels transparent + * @link https://php.net/manual/en/imagick.transparentpaintimage.php + * @param mixed $target

+ * The target color to paint + *

+ * @param float $alpha

+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent. + *

+ * @param float $fuzz

+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *

+ * @param bool $invert

+ * If TRUE paints any pixel that does not match the target color. + *

+ * @return bool TRUE on success. + */ + public function transparentPaintImage ($target, $alpha, $fuzz, $invert) {} + + /** + * (No version information available, might only be in SVN)
+ * Animates an image or images + * @link https://php.net/manual/en/imagick.liquidrescaleimage.php + * @param int $width

+ * The width of the target size + *

+ * @param int $height

+ * The height of the target size + *

+ * @param float $delta_x

+ * How much the seam can traverse on x-axis. + * Passing 0 causes the seams to be straight. + *

+ * @param float $rigidity

+ * Introduces a bias for non-straight seams. This parameter is + * typically 0. + *

+ * @return bool TRUE on success. + */ + public function liquidRescaleImage ($width, $height, $delta_x, $rigidity) {} + + /** + * (No version information available, might only be in SVN)
+ * Enciphers an image + * @link https://php.net/manual/en/imagick.encipherimage.php + * @param string $passphrase

+ * The passphrase + *

+ * @return bool TRUE on success. + */ + public function encipherImage ($passphrase) {} + + /** + * (No version information available, might only be in SVN)
+ * Deciphers an image + * @link https://php.net/manual/en/imagick.decipherimage.php + * @param string $passphrase

+ * The passphrase + *

+ * @return bool TRUE on success. + */ + public function decipherImage ($passphrase) {} + + /** + * (No version information available, might only be in SVN)
+ * Sets the gravity + * @link https://php.net/manual/en/imagick.setgravity.php + * @param int $gravity

+ * The gravity property. Refer to the list of + * gravity constants. + *

+ * @return bool No value is returned. + */ + public function setGravity ($gravity) {} + + /** + * (No version information available, might only be in SVN)
+ * Gets the gravity + * @link https://php.net/manual/en/imagick.getgravity.php + * @return int the gravity property. Refer to the list of + * gravity constants. + */ + public function getGravity () {} + + /** + * (PECL imagick 2.2.1)
+ * Gets channel range + * @link https://php.net/manual/en/imagick.getimagechannelrange.php + * @param int $channel

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return array an array containing minima and maxima values of the channel(s). + */ + public function getImageChannelRange ($channel) {} + + /** + * (No version information available, might only be in SVN)
+ * Gets the image alpha channel + * @link https://php.net/manual/en/imagick.getimagealphachannel.php + * @return int a constant defining the current alpha channel value. Refer to this + * list of alpha channel constants. + */ + public function getImageAlphaChannel () {} + + /** + * (No version information available, might only be in SVN)
+ * Gets channel distortions + * @link https://php.net/manual/en/imagick.getimagechanneldistortions.php + * @param Imagick $reference

+ * Imagick object containing the reference image + *

+ * @param int $metric

+ * Refer to this list of metric type constants. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return float a double describing the channel distortion. + */ + public function getImageChannelDistortions (Imagick $reference, $metric, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)
+ * Sets the image gravity + * @link https://php.net/manual/en/imagick.setimagegravity.php + * @param int $gravity

+ * The gravity property. Refer to the list of + * gravity constants. + *

+ * @return bool No value is returned. + */ + public function setImageGravity ($gravity) {} + + /** + * (No version information available, might only be in SVN)
+ * Gets the image gravity + * @link https://php.net/manual/en/imagick.getimagegravity.php + * @return int the images gravity property. Refer to the list of + * gravity constants. + */ + public function getImageGravity () {} + + /** + * (No version information available, might only be in SVN)
+ * Imports image pixels + * @link https://php.net/manual/en/imagick.importimagepixels.php + * @param int $x

+ * The image x position + *

+ * @param int $y

+ * The image y position + *

+ * @param int $width

+ * The image width + *

+ * @param int $height

+ * The image height + *

+ * @param string $map

+ * Map of pixel ordering as a string. This can be for example RGB. + * The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), + * O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad. + *

+ * @param int $storage

+ * The pixel storage method. + * Refer to this list of pixel constants. + *

+ * @param array $pixels

+ * The array of pixels + *

+ * @return bool TRUE on success. + */ + public function importImagePixels ($x, $y, $width, $height, $map, $storage, array $pixels) {} + + /** + * (No version information available, might only be in SVN)
+ * Removes skew from the image + * @link https://php.net/manual/en/imagick.deskewimage.php + * @param float $threshold

+ * Deskew threshold + *

+ * @return bool + */ + public function deskewImage ($threshold) {} + + /** + * (No version information available, might only be in SVN)
+ * Segments an image + * @link https://php.net/manual/en/imagick.segmentimage.php + * @param int $COLORSPACE

+ * One of the COLORSPACE constants. + *

+ * @param float $cluster_threshold

+ * A percentage describing minimum number of pixels + * contained in hexedra before it is considered valid. + *

+ * @param float $smooth_threshold

+ * Eliminates noise from the histogram. + *

+ * @param bool $verbose [optional]

+ * Whether to output detailed information about recognised classes. + *

+ * @return bool + */ + public function segmentImage ($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = false) {} + + /** + * (No version information available, might only be in SVN)
+ * Interpolates colors + * @link https://php.net/manual/en/imagick.sparsecolorimage.php + * @param int $SPARSE_METHOD

+ * Refer to this list of sparse method constants + *

+ * @param array $arguments

+ * An array containing the coordinates. + * The array is in format array(1,1, 2,45) + *

+ * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function sparseColorImage ($SPARSE_METHOD, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)
+ * Remaps image colors + * @link https://php.net/manual/en/imagick.remapimage.php + * @param Imagick $replacement

+ * An Imagick object containing the replacement colors + *

+ * @param int $DITHER

+ * Refer to this list of dither method constants + *

+ * @return bool TRUE on success. + */ + public function remapImage (Imagick $replacement, $DITHER) {} + + /** + * (No version information available, might only be in SVN)
+ * Exports raw image pixels + * @link https://php.net/manual/en/imagick.exportimagepixels.php + * @param int $x

+ * X-coordinate of the exported area + *

+ * @param int $y

+ * Y-coordinate of the exported area + *

+ * @param int $width

+ * Width of the exported aread + *

+ * @param int $height

+ * Height of the exported area + *

+ * @param string $map

+ * Ordering of the exported pixels. For example "RGB". + * Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. + *

+ * @param int $STORAGE

+ * Refer to this list of pixel type constants + *

+ * @return array an array containing the pixels values. + */ + public function exportImagePixels ($x, $y, $width, $height, $map, $STORAGE) {} + + /** + * (No version information available, might only be in SVN)
+ * The getImageChannelKurtosis purpose + * @link https://php.net/manual/en/imagick.getimagechannelkurtosis.php + * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return array an array with kurtosis and skewness + * members. + */ + public function getImageChannelKurtosis ($channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)
+ * Applies a function on the image + * @link https://php.net/manual/en/imagick.functionimage.php + * @param int $function

+ * Refer to this list of function constants + *

+ * @param array $arguments

+ * Array of arguments to pass to this function. + *

+ * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function functionImage ($function, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * @param $COLORSPACE + */ + public function transformImageColorspace ($COLORSPACE) {} + + /** + * (No version information available, might only be in SVN)
+ * Replaces colors in the image + * @link https://php.net/manual/en/imagick.haldclutimage.php + * @param Imagick $clut

+ * Imagick object containing the Hald lookup image. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function haldClutImage (Imagick $clut, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * @param $CHANNEL [optional] + */ + public function autoLevelImage ($CHANNEL) {} + + /** + * @param $factor [optional] + */ + public function blueShiftImage ($factor) {} + + /** + * (No version information available, might only be in SVN)
+ * Get image artifact + * @link https://php.net/manual/en/imagick.getimageartifact.php + * @param string $artifact

+ * The name of the artifact + *

+ * @return string the artifact value on success. + */ + public function getImageArtifact ($artifact) {} + + /** + * (No version information available, might only be in SVN)
+ * Set image artifact + * @link https://php.net/manual/en/imagick.setimageartifact.php + * @param string $artifact

+ * The name of the artifact + *

+ * @param string $value

+ * The value of the artifact + *

+ * @return bool TRUE on success. + */ + public function setImageArtifact ($artifact, $value) {} + + /** + * (No version information available, might only be in SVN)
+ * Delete image artifact + * @link https://php.net/manual/en/imagick.deleteimageartifact.php + * @param string $artifact

+ * The name of the artifact to delete + *

+ * @return bool TRUE on success. + */ + public function deleteImageArtifact ($artifact) {} + + /** + * (PECL imagick 0.9.10-0.9.9)
+ * Gets the colorspace + * @link https://php.net/manual/en/imagick.getcolorspace.php + * @return int an integer which can be compared against COLORSPACE constants. + */ + public function getColorspace () {} + + /** + * (No version information available, might only be in SVN)
+ * Set colorspace + * @link https://php.net/manual/en/imagick.setcolorspace.php + * @param int $COLORSPACE

+ * One of the COLORSPACE constants + *

+ * @return bool TRUE on success. + */ + public function setColorspace ($COLORSPACE) {} + + /** + * @param $CHANNEL [optional] + */ + public function clampImage ($CHANNEL) {} + + /** + * @param $stack + * @param $offset + */ + public function smushImages ($stack, $offset) {} + + /** + * (PECL imagick 2.0.0)
+ * The Imagick constructor + * @link https://php.net/manual/en/imagick.construct.php + * @param mixed $files

+ * The path to an image to load or an array of paths. Paths can include + * wildcards for file names, or can be URLs. + *

+ * @throws ImagickException Throws ImagickException on error. + */ + public function __construct ($files = null) {} + + /** + * @return string + */ + public function __toString () {} + + public function count () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a MagickPixelIterator + * @link https://php.net/manual/en/imagick.getpixeliterator.php + * @return ImagickPixelIterator an ImagickPixelIterator on success. + */ + public function getPixelIterator () {} + + /** + * (PECL imagick 2.0.0)
+ * Get an ImagickPixelIterator for an image section + * @link https://php.net/manual/en/imagick.getpixelregioniterator.php + * @param int $x

+ * The x-coordinate of the region. + *

+ * @param int $y

+ * The y-coordinate of the region. + *

+ * @param int $columns

+ * The width of the region. + *

+ * @param int $rows

+ * The height of the region. + *

+ * @return ImagickPixelIterator an ImagickPixelIterator for an image section. + */ + public function getPixelRegionIterator ($x, $y, $columns, $rows) {} + + /** + * (PECL imagick 0.9.0-0.9.9)
+ * Reads image from filename + * @link https://php.net/manual/en/imagick.readimage.php + * @param string $filename + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error. + */ + public function readImage ($filename) {} + + /** + * @param $filenames + * @throws ImagickException Throws ImagickException on error. + */ + public function readImages ($filenames) {} + + /** + * (PECL imagick 2.0.0)
+ * Reads image from a binary string + * @link https://php.net/manual/en/imagick.readimageblob.php + * @param string $image + * @param string $filename [optional] + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error. + */ + public function readImageBlob ($image, $filename = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the format of a particular image + * @link https://php.net/manual/en/imagick.setimageformat.php + * @param string $format

+ * String presentation of the image format. Format support + * depends on the ImageMagick installation. + *

+ * @return bool TRUE on success. + */ + public function setImageFormat ($format) {} + + /** + * Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.
+ * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
+ * If false, the calculations should produce the same results as ImageMagick CLI does. + * @link https://php.net/manual/en/imagick.scaleimage.php + * @param int $cols + * @param int $rows + * @param bool $bestfit [optional] The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function scaleImage ($cols, $rows, $bestfit = false, $legacy = false) {} + + /** + * (PECL imagick 0.9.0-0.9.9)
+ * Writes an image to the specified filename + * @link https://php.net/manual/en/imagick.writeimage.php + * @param string $filename [optional]

+ * Filename where to write the image. The extension of the filename + * defines the type of the file. + * Format can be forced regardless of file extension using format: prefix, + * for example "jpg:test.png". + *

+ * @return bool TRUE on success. + */ + public function writeImage ($filename = null) {} + + /** + * (PECL imagick 0.9.0-0.9.9)
+ * Writes an image or image sequence + * @link https://php.net/manual/en/imagick.writeimages.php + * @param string $filename + * @param bool $adjoin + * @return bool TRUE on success. + */ + public function writeImages ($filename, $adjoin) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds blur filter to image + * @link https://php.net/manual/en/imagick.blurimage.php + * @param float $radius

+ * Blur radius + *

+ * @param float $sigma

+ * Standard deviation + *

+ * @param int $channel [optional]

+ * The Channeltype + * constant. When not supplied, all channels are blurred. + *

+ * @return bool TRUE on success. + */ + public function blurImage ($radius, $sigma, $channel = null) {} + + /** + * Changes the size of an image to the given dimensions and removes any associated profiles.
+ * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
+ * If false, the calculations should produce the same results as ImageMagick CLI does.
+ *
+ * Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @link https://php.net/manual/en/imagick.thumbnailimage.php + * @param int $columns

+ * Image width + *

+ * @param int $rows

+ * Image height + *

+ * @param bool $bestfit [optional]

+ * Whether to force maximum values + *

+ * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @param bool $fill [optional] + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success. + * @since 2.0.0 + */ + public function thumbnailImage ($columns, $rows, $bestfit = false, $fill = false, $legacy = false) {} + + /** + * Creates a cropped thumbnail at the requested size. + * If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. + * If false it uses the correct behaviour. + * @link https://php.net/manual/en/imagick.cropthumbnailimage.php + * @param int $width The width of the thumbnail + * @param int $height The Height of the thumbnail + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on succes + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function cropThumbnailImage ($width, $height, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the filename of a particular image in a sequence + * @link https://php.net/manual/en/imagick.getimagefilename.php + * @return string a string with the filename of the image. + */ + public function getImageFilename () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the filename of a particular image + * @link https://php.net/manual/en/imagick.setimagefilename.php + * @param string $filename + * @return bool TRUE on success. + */ + public function setImageFilename ($filename) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the format of a particular image in a sequence + * @link https://php.net/manual/en/imagick.getimageformat.php + * @return string a string containing the image format on success. + */ + public function getImageFormat () {} + + /** + * @link https://secure.php.net/manual/en/imagick.getimagemimetype.php + * @return string Returns the image mime-type. + */ + public function getImageMimeType () {} + + /** + * (PECL imagick 2.0.0)
+ * Removes an image from the image list + * @link https://php.net/manual/en/imagick.removeimage.php + * @return bool TRUE on success. + */ + public function removeImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Destroys the Imagick object + * @link https://php.net/manual/en/imagick.destroy.php + * @return bool TRUE on success. + */ + public function destroy () {} + + /** + * (PECL imagick 2.0.0)
+ * Clears all resources associated to Imagick object + * @link https://php.net/manual/en/imagick.clear.php + * @return bool TRUE on success. + */ + public function clear () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image length in bytes + * @link https://php.net/manual/en/imagick.getimagesize.php + * @return int an int containing the current image size. + * @deprecated use {@see Imagick::getImageLength()} instead + */ + public function getImageSize () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image sequence as a blob + * @link https://php.net/manual/en/imagick.getimageblob.php + * @return string a string containing the image. + */ + public function getImageBlob () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns all image sequences as a blob + * @link https://php.net/manual/en/imagick.getimagesblob.php + * @return string a string containing the images. On failure, throws ImagickException on failure + * @throws ImagickException on failure + */ + public function getImagesBlob () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the Imagick iterator to the first image + * @link https://php.net/manual/en/imagick.setfirstiterator.php + * @return bool TRUE on success. + */ + public function setFirstIterator () {} + + /** + * (PECL imagick 2.0.1)
+ * Sets the Imagick iterator to the last image + * @link https://php.net/manual/en/imagick.setlastiterator.php + * @return bool TRUE on success. + */ + public function setLastIterator () {} + + public function resetIterator () {} + + /** + * (PECL imagick 2.0.0)
+ * Move to the previous image in the object + * @link https://php.net/manual/en/imagick.previousimage.php + * @return bool TRUE on success. + */ + public function previousImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Moves to the next image + * @link https://php.net/manual/en/imagick.nextimage.php + * @return bool TRUE on success. + */ + public function nextImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Checks if the object has a previous image + * @link https://php.net/manual/en/imagick.haspreviousimage.php + * @return bool TRUE if the object has more images when traversing the list in the + * reverse direction, returns FALSE if there are none. + */ + public function hasPreviousImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Checks if the object has more images + * @link https://php.net/manual/en/imagick.hasnextimage.php + * @return bool TRUE if the object has more images when traversing the list in the + * forward direction, returns FALSE if there are none. + */ + public function hasNextImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Set the iterator position + * @link https://php.net/manual/en/imagick.setimageindex.php + * @param int $index

+ * The position to set the iterator to + *

+ * @return bool TRUE on success. + */ + public function setImageIndex ($index) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the index of the current active image + * @link https://php.net/manual/en/imagick.getimageindex.php + * @return int an integer containing the index of the image in the stack. + */ + public function getImageIndex () {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a comment to your image + * @link https://php.net/manual/en/imagick.commentimage.php + * @param string $comment

+ * The comment to add + *

+ * @return bool TRUE on success. + */ + public function commentImage ($comment) {} + + /** + * (PECL imagick 2.0.0)
+ * Extracts a region of the image + * @link https://php.net/manual/en/imagick.cropimage.php + * @param int $width

+ * The width of the crop + *

+ * @param int $height

+ * The height of the crop + *

+ * @param int $x

+ * The X coordinate of the cropped region's top left corner + *

+ * @param int $y

+ * The Y coordinate of the cropped region's top left corner + *

+ * @return bool TRUE on success. + */ + public function cropImage ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a label to an image + * @link https://php.net/manual/en/imagick.labelimage.php + * @param string $label

+ * The label to add + *

+ * @return bool TRUE on success. + */ + public function labelImage ($label) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the width and height as an associative array + * @link https://php.net/manual/en/imagick.getimagegeometry.php + * @return array an array with the width/height of the image. + */ + public function getImageGeometry () {} + + /** + * (PECL imagick 2.0.0)
+ * Renders the ImagickDraw object on the current image + * @link https://php.net/manual/en/imagick.drawimage.php + * @param ImagickDraw $draw

+ * The drawing operations to render on the image. + *

+ * @return bool TRUE on success. + */ + public function drawImage (ImagickDraw $draw) {} + + /** + * (No version information available, might only be in SVN)
+ * Sets the image compression quality + * @link https://php.net/manual/en/imagick.setimagecompressionquality.php + * @param int $quality

+ * The image compression quality as an integer + *

+ * @return bool TRUE on success. + */ + public function setImageCompressionQuality ($quality) {} + + /** + * (PECL imagick 2.2.2)
+ * Gets the current image's compression quality + * @link https://php.net/manual/en/imagick.getimagecompressionquality.php + * @return int integer describing the images compression quality + */ + public function getImageCompressionQuality () {} + + /** + * (PECL imagick 2.0.0)
+ * Annotates an image with text + * @link https://php.net/manual/en/imagick.annotateimage.php + * @param ImagickDraw $draw_settings

+ * The ImagickDraw object that contains settings for drawing the text + *

+ * @param float $x

+ * Horizontal offset in pixels to the left of text + *

+ * @param float $y

+ * Vertical offset in pixels to the baseline of text + *

+ * @param float $angle

+ * The angle at which to write the text + *

+ * @param string $text

+ * The string to draw + *

+ * @return bool TRUE on success. + */ + public function annotateImage (ImagickDraw $draw_settings, $x, $y, $angle, $text) {} + + /** + * (PECL imagick 2.0.0)
+ * Composite one image onto another + * @link https://php.net/manual/en/imagick.compositeimage.php + * @param Imagick $composite_object

+ * Imagick object which holds the composite image + *

+ * @param int $composite Composite operator + * @param int $x

+ * The column offset of the composited image + *

+ * @param int $y

+ * The row offset of the composited image + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function compositeImage (Imagick $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Control the brightness, saturation, and hue + * @link https://php.net/manual/en/imagick.modulateimage.php + * @param float $brightness + * @param float $saturation + * @param float $hue + * @return bool TRUE on success. + */ + public function modulateImage ($brightness, $saturation, $hue) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the number of unique colors in the image + * @link https://php.net/manual/en/imagick.getimagecolors.php + * @return int TRUE on success. + */ + public function getImageColors () {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a composite image + * @link https://php.net/manual/en/imagick.montageimage.php + * @param ImagickDraw $draw

+ * The font name, size, and color are obtained from this object. + *

+ * @param string $tile_geometry

+ * The number of tiles per row and page (e.g. 6x4+0+0). + *

+ * @param string $thumbnail_geometry

+ * Preferred image size and border size of each thumbnail + * (e.g. 120x120+4+3>). + *

+ * @param int $mode

+ * Thumbnail framing mode, see Montage Mode constants. + *

+ * @param string $frame

+ * Surround the image with an ornamental border (e.g. 15x15+3+3). The + * frame color is that of the thumbnail's matte color. + *

+ * @return Imagick TRUE on success. + */ + public function montageImage (ImagickDraw $draw, $tile_geometry, $thumbnail_geometry, $mode, $frame) {} + + /** + * (PECL imagick 2.0.0)
+ * Identifies an image and fetches attributes + * @link https://php.net/manual/en/imagick.identifyimage.php + * @param bool $appendRawOutput [optional] + * @return array Identifies an image and returns the attributes. Attributes include + * the image width, height, size, and others. + */ + public function identifyImage ($appendRawOutput = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Changes the value of individual pixels based on a threshold + * @link https://php.net/manual/en/imagick.thresholdimage.php + * @param float $threshold + * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function thresholdImage ($threshold, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Selects a threshold for each pixel based on a range of intensity + * @link https://php.net/manual/en/imagick.adaptivethresholdimage.php + * @param int $width

+ * Width of the local neighborhood. + *

+ * @param int $height

+ * Height of the local neighborhood. + *

+ * @param int $offset

+ * The mean offset + *

+ * @return bool TRUE on success. + */ + public function adaptiveThresholdImage ($width, $height, $offset) {} + + /** + * (PECL imagick 2.0.0)
+ * Forces all pixels below the threshold into black + * @link https://php.net/manual/en/imagick.blackthresholdimage.php + * @param mixed $threshold

+ * The threshold below which everything turns black + *

+ * @return bool TRUE on success. + */ + public function blackThresholdImage ($threshold) {} + + /** + * (PECL imagick 2.0.0)
+ * Force all pixels above the threshold into white + * @link https://php.net/manual/en/imagick.whitethresholdimage.php + * @param mixed $threshold + * @return bool TRUE on success. + */ + public function whiteThresholdImage ($threshold) {} + + /** + * (PECL imagick 2.0.0)
+ * Append a set of images + * @link https://php.net/manual/en/imagick.appendimages.php + * @param bool $stack [optional]

+ * Whether to stack the images vertically. + * By default (or if FALSE is specified) images are stacked left-to-right. + * If stack is TRUE, images are stacked top-to-bottom. + *

+ * @return Imagick Imagick instance on success. + */ + public function appendImages ($stack = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates a charcoal drawing + * @link https://php.net/manual/en/imagick.charcoalimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels + *

+ * @return bool TRUE on success. + */ + public function charcoalImage ($radius, $sigma) {} + + /** + * (PECL imagick 2.0.0)
+ * Enhances the contrast of a color image + * @link https://php.net/manual/en/imagick.normalizeimage.php + * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function normalizeImage ($channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates an oil painting + * @link https://php.net/manual/en/imagick.oilpaintimage.php + * @param float $radius

+ * The radius of the circular neighborhood. + *

+ * @return bool TRUE on success. + */ + public function oilPaintImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Reduces the image to a limited number of color level + * @link https://php.net/manual/en/imagick.posterizeimage.php + * @param int $levels + * @param bool $dither + * @return bool TRUE on success. + */ + public function posterizeImage ($levels, $dither) {} + + /** + * (PECL imagick 2.0.0)
+ * Radial blurs an image + * @link https://php.net/manual/en/imagick.radialblurimage.php + * @param float $angle + * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function radialBlurImage ($angle, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a simulated 3d button-like effect + * @link https://php.net/manual/en/imagick.raiseimage.php + * @param int $width + * @param int $height + * @param int $x + * @param int $y + * @param bool $raise + * @return bool TRUE on success. + */ + public function raiseImage ($width, $height, $x, $y, $raise) {} + + /** + * (PECL imagick 2.0.0)
+ * Resample image to desired resolution + * @link https://php.net/manual/en/imagick.resampleimage.php + * @param float $x_resolution + * @param float $y_resolution + * @param int $filter + * @param float $blur + * @return bool TRUE on success. + */ + public function resampleImage ($x_resolution, $y_resolution, $filter, $blur) {} + + /** + * Scales an image to the desired dimensions with one of these filters:
+ * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
+ * If false, the calculations should produce the same results as ImageMagick CLI does.
+ *
+ * Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched.
+ * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @link https://php.net/manual/en/imagick.resizeimage.php + * @param int $columns Width of the image + * @param int $rows Height of the image + * @param int $filter Refer to the list of filter constants. + * @param float $blur The blur factor where > 1 is blurry, < 1 is sharp. + * @param bool $bestfit [optional] Added since 2.1.0. Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success + * @since 2.0.0 + */ + public function resizeImage ($columns, $rows, $filter, $blur, $bestfit = false, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Offsets an image + * @link https://php.net/manual/en/imagick.rollimage.php + * @param int $x

+ * The X offset. + *

+ * @param int $y

+ * The Y offset. + *

+ * @return bool TRUE on success. + */ + public function rollImage ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Rotates an image + * @link https://php.net/manual/en/imagick.rotateimage.php + * @param mixed $background

+ * The background color + *

+ * @param float $degrees

+ * The number of degrees to rotate the image + *

+ * @return bool TRUE on success. + */ + public function rotateImage ($background, $degrees) {} + + /** + * (PECL imagick 2.0.0)
+ * Scales an image with pixel sampling + * @link https://php.net/manual/en/imagick.sampleimage.php + * @param int $columns + * @param int $rows + * @return bool TRUE on success. + */ + public function sampleImage ($columns, $rows) {} + + /** + * (PECL imagick 2.0.0)
+ * Applies a solarizing effect to the image + * @link https://php.net/manual/en/imagick.solarizeimage.php + * @param int $threshold + * @return bool TRUE on success. + */ + public function solarizeImage ($threshold) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates an image shadow + * @link https://php.net/manual/en/imagick.shadowimage.php + * @param float $opacity + * @param float $sigma + * @param int $x + * @param int $y + * @return bool TRUE on success. + */ + public function shadowImage ($opacity, $sigma, $x, $y) {} + + /** + * @param $key + * @param $value + */ + public function setImageAttribute ($key, $value) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image background color + * @link https://php.net/manual/en/imagick.setimagebackgroundcolor.php + * @param mixed $background + * @return bool TRUE on success. + */ + public function setImageBackgroundColor ($background) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image composite operator + * @link https://php.net/manual/en/imagick.setimagecompose.php + * @param int $compose + * @return bool TRUE on success. + */ + public function setImageCompose ($compose) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image compression + * @link https://php.net/manual/en/imagick.setimagecompression.php + * @param int $compression

+ * One of the COMPRESSION constants + *

+ * @return bool TRUE on success. + */ + public function setImageCompression ($compression) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image delay + * @link https://php.net/manual/en/imagick.setimagedelay.php + * @param int $delay

+ * The amount of time expressed in 'ticks' that the image should be + * displayed for. For animated GIFs there are 100 ticks per second, so a + * value of 20 would be 20/100 of a second aka 1/5th of a second. + *

+ * @return bool TRUE on success. + */ + public function setImageDelay ($delay) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image depth + * @link https://php.net/manual/en/imagick.setimagedepth.php + * @param int $depth + * @return bool TRUE on success. + */ + public function setImageDepth ($depth) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image gamma + * @link https://php.net/manual/en/imagick.setimagegamma.php + * @param float $gamma + * @return bool TRUE on success. + */ + public function setImageGamma ($gamma) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image iterations + * @link https://php.net/manual/en/imagick.setimageiterations.php + * @param int $iterations

+ * The number of iterations the image should loop over. Set to '0' to loop + * continuously. + *

+ * @return bool TRUE on success. + */ + public function setImageIterations ($iterations) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image matte color + * @link https://php.net/manual/en/imagick.setimagemattecolor.php + * @param mixed $matte + * @return bool TRUE on success. + */ + public function setImageMatteColor ($matte) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the page geometry of the image + * @link https://php.net/manual/en/imagick.setimagepage.php + * @param int $width + * @param int $height + * @param int $x + * @param int $y + * @return bool TRUE on success. + */ + public function setImagePage ($width, $height, $x, $y) {} + + /** + * @param $filename + */ + public function setImageProgressMonitor ($filename) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image resolution + * @link https://php.net/manual/en/imagick.setimageresolution.php + * @param float $x_resolution + * @param float $y_resolution + * @return bool TRUE on success. + */ + public function setImageResolution ($x_resolution, $y_resolution) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image scene + * @link https://php.net/manual/en/imagick.setimagescene.php + * @param int $scene + * @return bool TRUE on success. + */ + public function setImageScene ($scene) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image ticks-per-second + * @link https://php.net/manual/en/imagick.setimagetickspersecond.php + * @param int $ticks_per_second

+ * The duration for which an image should be displayed expressed in ticks + * per second. + *

+ * @return bool TRUE on success. + */ + public function setImageTicksPerSecond ($ticks_per_second) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image type + * @link https://php.net/manual/en/imagick.setimagetype.php + * @param int $image_type + * @return bool TRUE on success. + */ + public function setImageType ($image_type) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image units of resolution + * @link https://php.net/manual/en/imagick.setimageunits.php + * @param int $units + * @return bool TRUE on success. + */ + public function setImageUnits ($units) {} + + /** + * (PECL imagick 2.0.0)
+ * Sharpens an image + * @link https://php.net/manual/en/imagick.sharpenimage.php + * @param float $radius + * @param float $sigma + * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function sharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Shaves pixels from the image edges + * @link https://php.net/manual/en/imagick.shaveimage.php + * @param int $columns + * @param int $rows + * @return bool TRUE on success. + */ + public function shaveImage ($columns, $rows) {} + + /** + * (PECL imagick 2.0.0)
+ * Creating a parallelogram + * @link https://php.net/manual/en/imagick.shearimage.php + * @param mixed $background

+ * The background color + *

+ * @param float $x_shear

+ * The number of degrees to shear on the x axis + *

+ * @param float $y_shear

+ * The number of degrees to shear on the y axis + *

+ * @return bool TRUE on success. + */ + public function shearImage ($background, $x_shear, $y_shear) {} + + /** + * (PECL imagick 2.0.0)
+ * Splices a solid color into the image + * @link https://php.net/manual/en/imagick.spliceimage.php + * @param int $width + * @param int $height + * @param int $x + * @param int $y + * @return bool TRUE on success. + */ + public function spliceImage ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Fetch basic attributes about the image + * @link https://php.net/manual/en/imagick.pingimage.php + * @param string $filename

+ * The filename to read the information from. + *

+ * @return bool TRUE on success. + */ + public function pingImage ($filename) {} + + /** + * (PECL imagick 2.0.0)
+ * Reads image from open filehandle + * @link https://php.net/manual/en/imagick.readimagefile.php + * @param resource $filehandle + * @param string $fileName [optional] + * @return bool TRUE on success. + */ + public function readImageFile ($filehandle, $fileName = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Displays an image + * @link https://php.net/manual/en/imagick.displayimage.php + * @param string $servername

+ * The X server name + *

+ * @return bool TRUE on success. + */ + public function displayImage ($servername) {} + + /** + * (PECL imagick 2.0.0)
+ * Displays an image or image sequence + * @link https://php.net/manual/en/imagick.displayimages.php + * @param string $servername

+ * The X server name + *

+ * @return bool TRUE on success. + */ + public function displayImages ($servername) {} + + /** + * (PECL imagick 2.0.0)
+ * Randomly displaces each pixel in a block + * @link https://php.net/manual/en/imagick.spreadimage.php + * @param float $radius + * @return bool TRUE on success. + */ + public function spreadImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Swirls the pixels about the center of the image + * @link https://php.net/manual/en/imagick.swirlimage.php + * @param float $degrees + * @return bool TRUE on success. + */ + public function swirlImage ($degrees) {} + + /** + * (PECL imagick 2.0.0)
+ * Strips an image of all profiles and comments + * @link https://php.net/manual/en/imagick.stripimage.php + * @return bool TRUE on success. + */ + public function stripImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns formats supported by Imagick + * @link https://php.net/manual/en/imagick.queryformats.php + * @param string $pattern [optional] + * @return array an array containing the formats supported by Imagick. + */ + public static function queryFormats ($pattern = "*") {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the configured fonts + * @link https://php.net/manual/en/imagick.queryfonts.php + * @param string $pattern [optional]

+ * The query pattern + *

+ * @return array an array containing the configured fonts. + */ + public static function queryFonts ($pattern = "*") {} + + /** + * (PECL imagick 2.0.0)
+ * Returns an array representing the font metrics + * @link https://php.net/manual/en/imagick.queryfontmetrics.php + * @param ImagickDraw $properties

+ * ImagickDraw object containing font properties + *

+ * @param string $text

+ * The text + *

+ * @param bool $multiline [optional]

+ * Multiline parameter. If left empty it is autodetected + *

+ * @return array a multi-dimensional array representing the font metrics. + */ + public function queryFontMetrics (ImagickDraw $properties, $text, $multiline = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Hides a digital watermark within the image + * @link https://php.net/manual/en/imagick.steganoimage.php + * @param Imagick $watermark_wand + * @param int $offset + * @return Imagick TRUE on success. + */ + public function steganoImage (Imagick $watermark_wand, $offset) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds random noise to the image + * @link https://php.net/manual/en/imagick.addnoiseimage.php + * @param int $noise_type

+ * The type of the noise. Refer to this list of + * noise constants. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return bool TRUE on success. + */ + public function addNoiseImage ($noise_type, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)
+ * Simulates motion blur + * @link https://php.net/manual/en/imagick.motionblurimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel. + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels. + *

+ * @param float $angle

+ * Apply the effect along this angle. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + * The channel argument affects only if Imagick is compiled against ImageMagick version + * 6.4.4 or greater. + *

+ * @return bool TRUE on success. + */ + public function motionBlurImage ($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)
+ * Forms a mosaic from images + * @link https://php.net/manual/en/imagick.mosaicimages.php + * @return Imagick TRUE on success. + */ + public function mosaicImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Method morphs a set of images + * @link https://php.net/manual/en/imagick.morphimages.php + * @param int $number_frames

+ * The number of in-between images to generate. + *

+ * @return Imagick This method returns a new Imagick object on success. + * Throw an ImagickException on error. + * @throws ImagickException on error + */ + public function morphImages ($number_frames) {} + + /** + * (PECL imagick 2.0.0)
+ * Scales an image proportionally to half its size + * @link https://php.net/manual/en/imagick.minifyimage.php + * @return bool TRUE on success. + */ + public function minifyImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Transforms an image + * @link https://php.net/manual/en/imagick.affinetransformimage.php + * @param ImagickDraw $matrix

+ * The affine matrix + *

+ * @return bool TRUE on success. + */ + public function affineTransformImage (ImagickDraw $matrix) {} + + /** + * (PECL imagick 2.0.0)
+ * Average a set of images + * @link https://php.net/manual/en/imagick.averageimages.php + * @return Imagick a new Imagick object on success. + */ + public function averageImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Surrounds the image with a border + * @link https://php.net/manual/en/imagick.borderimage.php + * @param mixed $bordercolor

+ * ImagickPixel object or a string containing the border color + *

+ * @param int $width

+ * Border width + *

+ * @param int $height

+ * Border height + *

+ * @return bool TRUE on success. + */ + public function borderImage ($bordercolor, $width, $height) {} + + /** + * (PECL imagick 2.0.0)
+ * Removes a region of an image and trims + * @link https://php.net/manual/en/imagick.chopimage.php + * @param int $width

+ * Width of the chopped area + *

+ * @param int $height

+ * Height of the chopped area + *

+ * @param int $x

+ * X origo of the chopped area + *

+ * @param int $y

+ * Y origo of the chopped area + *

+ * @return bool TRUE on success. + */ + public function chopImage ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Clips along the first path from the 8BIM profile + * @link https://php.net/manual/en/imagick.clipimage.php + * @return bool TRUE on success. + */ + public function clipImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Clips along the named paths from the 8BIM profile + * @link https://php.net/manual/en/imagick.clippathimage.php + * @param string $pathname

+ * The name of the path + *

+ * @param bool $inside

+ * If TRUE later operations take effect inside clipping path. + * Otherwise later operations take effect outside clipping path. + *

+ * @return bool TRUE on success. + */ + public function clipPathImage ($pathname, $inside) {} + + /** + * @param $pathname + * @param $inside + */ + public function clipImagePath ($pathname, $inside) {} + + /** + * (PECL imagick 2.0.0)
+ * Composites a set of images + * @link https://php.net/manual/en/imagick.coalesceimages.php + * @return Imagick a new Imagick object on success. + */ + public function coalesceImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Changes the color value of any pixel that matches target + * @link https://php.net/manual/en/imagick.colorfloodfillimage.php + * @param mixed $fill

+ * ImagickPixel object containing the fill color + *

+ * @param float $fuzz

+ * The amount of fuzz. For example, set fuzz to 10 and the color red at + * intensities of 100 and 102 respectively are now interpreted as the + * same color for the purposes of the floodfill. + *

+ * @param mixed $bordercolor

+ * ImagickPixel object containing the border color + *

+ * @param int $x

+ * X start position of the floodfill + *

+ * @param int $y

+ * Y start position of the floodfill + *

+ * @return bool TRUE on success. + */ + public function colorFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y) {} + + /** + * Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.
+ * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 + * @link https://php.net/manual/en/imagick.colorizeimage.php + * @param mixed $colorize

+ * ImagickPixel object or a string containing the colorize color + *

+ * @param mixed $opacity

+ * ImagickPixel object or an float containing the opacity value. + * 1.0 is fully opaque and 0.0 is fully transparent. + *

+ * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function colorizeImage ($colorize, $opacity, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the difference in one or more images + * @link https://php.net/manual/en/imagick.compareimagechannels.php + * @param Imagick $image

+ * Imagick object containing the image to compare. + *

+ * @param int $channelType

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @param int $metricType

+ * One of the metric type constants. + *

+ * @return array Array consisting of new_wand and + * distortion. + */ + public function compareImageChannels (Imagick $image, $channelType, $metricType) {} + + /** + * (PECL imagick 2.0.0)
+ * Compares an image to a reconstructed image + * @link https://php.net/manual/en/imagick.compareimages.php + * @param Imagick $compare

+ * An image to compare to. + *

+ * @param int $metric

+ * Provide a valid metric type constant. Refer to this + * list of metric constants. + *

+ * @return array Array consisting of an Imagick object of the + * reconstructed image and a double representing the difference. + * @throws ImagickException Throws ImagickException on error. + */ + public function compareImages (Imagick $compare, $metric) {} + + /** + * (PECL imagick 2.0.0)
+ * Change the contrast of the image + * @link https://php.net/manual/en/imagick.contrastimage.php + * @param bool $sharpen

+ * The sharpen value + *

+ * @return bool TRUE on success. + */ + public function contrastImage ($sharpen) {} + + /** + * (PECL imagick 2.0.0)
+ * Combines one or more images into a single image + * @link https://php.net/manual/en/imagick.combineimages.php + * @param int $channelType

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return Imagick TRUE on success. + */ + public function combineImages ($channelType) {} + + /** + * (PECL imagick 2.0.0)
+ * Applies a custom convolution kernel to the image + * @link https://php.net/manual/en/imagick.convolveimage.php + * @param array $kernel

+ * The convolution kernel + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function convolveImage (array $kernel, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Displaces an image's colormap + * @link https://php.net/manual/en/imagick.cyclecolormapimage.php + * @param int $displace

+ * The amount to displace the colormap. + *

+ * @return bool TRUE on success. + */ + public function cycleColormapImage ($displace) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns certain pixel differences between images + * @link https://php.net/manual/en/imagick.deconstructimages.php + * @return Imagick a new Imagick object on success. + */ + public function deconstructImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Reduces the speckle noise in an image + * @link https://php.net/manual/en/imagick.despeckleimage.php + * @return bool TRUE on success. + */ + public function despeckleImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Enhance edges within the image + * @link https://php.net/manual/en/imagick.edgeimage.php + * @param float $radius

+ * The radius of the operation. + *

+ * @return bool TRUE on success. + */ + public function edgeImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a grayscale image with a three-dimensional effect + * @link https://php.net/manual/en/imagick.embossimage.php + * @param float $radius

+ * The radius of the effect + *

+ * @param float $sigma

+ * The sigma of the effect + *

+ * @return bool TRUE on success. + */ + public function embossImage ($radius, $sigma) {} + + /** + * (PECL imagick 2.0.0)
+ * Improves the quality of a noisy image + * @link https://php.net/manual/en/imagick.enhanceimage.php + * @return bool TRUE on success. + */ + public function enhanceImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Equalizes the image histogram + * @link https://php.net/manual/en/imagick.equalizeimage.php + * @return bool TRUE on success. + */ + public function equalizeImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Applies an expression to an image + * @link https://php.net/manual/en/imagick.evaluateimage.php + * @param int $op

+ * The evaluation operator + *

+ * @param float $constant

+ * The value of the operator + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function evaluateImage ($op, $constant, $channel = Imagick::CHANNEL_ALL) {} + + /** + * Merges a sequence of images. This is useful for combining Photoshop layers into a single image. + * This is replaced by: + *
+	 * $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN)
+	 * 
+ * @link https://php.net/manual/en/imagick.flattenimages.php + * @return Imagick Returns an Imagick object containing the merged image. + * @throws ImagickException Throws ImagickException on error. + * @since 2.0.0 + */ + public function flattenImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a vertical mirror image + * @link https://php.net/manual/en/imagick.flipimage.php + * @return bool TRUE on success. + */ + public function flipImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a horizontal mirror image + * @link https://php.net/manual/en/imagick.flopimage.php + * @return bool TRUE on success. + */ + public function flopImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a simulated three-dimensional border + * @link https://php.net/manual/en/imagick.frameimage.php + * @param mixed $matte_color

+ * ImagickPixel object or a string representing the matte color + *

+ * @param int $width

+ * The width of the border + *

+ * @param int $height

+ * The height of the border + *

+ * @param int $inner_bevel

+ * The inner bevel width + *

+ * @param int $outer_bevel

+ * The outer bevel width + *

+ * @return bool TRUE on success. + */ + public function frameImage ($matte_color, $width, $height, $inner_bevel, $outer_bevel) {} + + /** + * (PECL imagick 2.0.0)
+ * Evaluate expression for each pixel in the image + * @link https://php.net/manual/en/imagick.fximage.php + * @param string $expression

+ * The expression. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return Imagick TRUE on success. + */ + public function fxImage ($expression, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Gamma-corrects an image + * @link https://php.net/manual/en/imagick.gammaimage.php + * @param float $gamma

+ * The amount of gamma-correction. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function gammaImage ($gamma, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Blurs an image + * @link https://php.net/manual/en/imagick.gaussianblurimage.php + * @param float $radius

+ * The radius of the Gaussian, in pixels, not counting the center pixel. + *

+ * @param float $sigma

+ * The standard deviation of the Gaussian, in pixels. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function gaussianBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} + + /** + * @param $key + */ + public function getImageAttribute ($key) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image background color + * @link https://php.net/manual/en/imagick.getimagebackgroundcolor.php + * @return ImagickPixel an ImagickPixel set to the background color of the image. + */ + public function getImageBackgroundColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the chromaticy blue primary point + * @link https://php.net/manual/en/imagick.getimageblueprimary.php + * @return array Array consisting of "x" and "y" coordinates of point. + */ + public function getImageBluePrimary () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image border color + * @link https://php.net/manual/en/imagick.getimagebordercolor.php + * @return ImagickPixel TRUE on success. + */ + public function getImageBorderColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the depth for a particular image channel + * @link https://php.net/manual/en/imagick.getimagechanneldepth.php + * @param int $channel

+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *

+ * @return int TRUE on success. + */ + public function getImageChannelDepth ($channel) {} + + /** + * (PECL imagick 2.0.0)
+ * Compares image channels of an image to a reconstructed image + * @link https://php.net/manual/en/imagick.getimagechanneldistortion.php + * @param Imagick $reference

+ * Imagick object to compare to. + *

+ * @param int $channel

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @param int $metric

+ * One of the metric type constants. + *

+ * @return float TRUE on success. + */ + public function getImageChannelDistortion (Imagick $reference, $channel, $metric) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the extrema for one or more image channels + * @link https://php.net/manual/en/imagick.getimagechannelextrema.php + * @param int $channel

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return array TRUE on success. + */ + public function getImageChannelExtrema ($channel) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the mean and standard deviation + * @link https://php.net/manual/en/imagick.getimagechannelmean.php + * @param int $channel

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return array TRUE on success. + */ + public function getImageChannelMean ($channel) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns statistics for each channel in the image + * @link https://php.net/manual/en/imagick.getimagechannelstatistics.php + * @return array TRUE on success. + */ + public function getImageChannelStatistics () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the color of the specified colormap index + * @link https://php.net/manual/en/imagick.getimagecolormapcolor.php + * @param int $index

+ * The offset into the image colormap. + *

+ * @return ImagickPixel TRUE on success. + */ + public function getImageColormapColor ($index) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image colorspace + * @link https://php.net/manual/en/imagick.getimagecolorspace.php + * @return int TRUE on success. + */ + public function getImageColorspace () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the composite operator associated with the image + * @link https://php.net/manual/en/imagick.getimagecompose.php + * @return int TRUE on success. + */ + public function getImageCompose () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image delay + * @link https://php.net/manual/en/imagick.getimagedelay.php + * @return int the image delay. + */ + public function getImageDelay () {} + + /** + * (PECL imagick 0.9.1-0.9.9)
+ * Gets the image depth + * @link https://php.net/manual/en/imagick.getimagedepth.php + * @return int The image depth. + */ + public function getImageDepth () {} + + /** + * (PECL imagick 2.0.0)
+ * Compares an image to a reconstructed image + * @link https://php.net/manual/en/imagick.getimagedistortion.php + * @param Imagick $reference

+ * Imagick object to compare to. + *

+ * @param int $metric

+ * One of the metric type constants. + *

+ * @return float the distortion metric used on the image (or the best guess + * thereof). + */ + public function getImageDistortion (Imagick $reference, $metric) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the extrema for the image + * @link https://php.net/manual/en/imagick.getimageextrema.php + * @return array an associative array with the keys "min" and "max". + */ + public function getImageExtrema () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image disposal method + * @link https://php.net/manual/en/imagick.getimagedispose.php + * @return int the dispose method on success. + */ + public function getImageDispose () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image gamma + * @link https://php.net/manual/en/imagick.getimagegamma.php + * @return float the image gamma on success. + */ + public function getImageGamma () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the chromaticy green primary point + * @link https://php.net/manual/en/imagick.getimagegreenprimary.php + * @return array an array with the keys "x" and "y" on success, throws an ImagickException on failure. + * @throws ImagickException on failure + */ + public function getImageGreenPrimary () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image height + * @link https://php.net/manual/en/imagick.getimageheight.php + * @return int the image height in pixels. + */ + public function getImageHeight () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image histogram + * @link https://php.net/manual/en/imagick.getimagehistogram.php + * @return array the image histogram as an array of ImagickPixel objects. + */ + public function getImageHistogram () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image interlace scheme + * @link https://php.net/manual/en/imagick.getimageinterlacescheme.php + * @return int the interlace scheme as an integer on success. + * Trhow an ImagickException on error. + * @throws ImagickException on error + */ + public function getImageInterlaceScheme () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image iterations + * @link https://php.net/manual/en/imagick.getimageiterations.php + * @return int the image iterations as an integer. + */ + public function getImageIterations () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image matte color + * @link https://php.net/manual/en/imagick.getimagemattecolor.php + * @return ImagickPixel ImagickPixel object on success. + */ + public function getImageMatteColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the page geometry + * @link https://php.net/manual/en/imagick.getimagepage.php + * @return array the page geometry associated with the image in an array with the + * keys "width", "height", "x", and "y". + */ + public function getImagePage () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the color of the specified pixel + * @link https://php.net/manual/en/imagick.getimagepixelcolor.php + * @param int $x

+ * The x-coordinate of the pixel + *

+ * @param int $y

+ * The y-coordinate of the pixel + *

+ * @return ImagickPixel an ImagickPixel instance for the color at the coordinates given. + */ + public function getImagePixelColor ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the named image profile + * @link https://php.net/manual/en/imagick.getimageprofile.php + * @param string $name

+ * The name of the profile to return. + *

+ * @return string a string containing the image profile. + */ + public function getImageProfile ($name) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the chromaticity red primary point + * @link https://php.net/manual/en/imagick.getimageredprimary.php + * @return array the chromaticity red primary point as an array with the keys "x" + * and "y". + * Throw an ImagickException on error. + * @throws ImagickException on error + */ + public function getImageRedPrimary () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image rendering intent + * @link https://php.net/manual/en/imagick.getimagerenderingintent.php + * @return int the image rendering intent. + */ + public function getImageRenderingIntent () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image X and Y resolution + * @link https://php.net/manual/en/imagick.getimageresolution.php + * @return array the resolution as an array. + */ + public function getImageResolution () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image scene + * @link https://php.net/manual/en/imagick.getimagescene.php + * @return int the image scene. + */ + public function getImageScene () {} + + /** + * (PECL imagick 2.0.0)
+ * Generates an SHA-256 message digest + * @link https://php.net/manual/en/imagick.getimagesignature.php + * @return string a string containing the SHA-256 hash of the file. + */ + public function getImageSignature () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image ticks-per-second + * @link https://php.net/manual/en/imagick.getimagetickspersecond.php + * @return int the image ticks-per-second. + */ + public function getImageTicksPerSecond () {} + + /** + * (PECL imagick 0.9.10-0.9.9)
+ * Gets the potential image type + * @link https://php.net/manual/en/imagick.getimagetype.php + * @return int the potential image type. + * imagick::IMGTYPE_UNDEFINED + * imagick::IMGTYPE_BILEVEL + * imagick::IMGTYPE_GRAYSCALE + * imagick::IMGTYPE_GRAYSCALEMATTE + * imagick::IMGTYPE_PALETTE + * imagick::IMGTYPE_PALETTEMATTE + * imagick::IMGTYPE_TRUECOLOR + * imagick::IMGTYPE_TRUECOLORMATTE + * imagick::IMGTYPE_COLORSEPARATION + * imagick::IMGTYPE_COLORSEPARATIONMATTE + * imagick::IMGTYPE_OPTIMIZE + */ + public function getImageType () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image units of resolution + * @link https://php.net/manual/en/imagick.getimageunits.php + * @return int the image units of resolution. + */ + public function getImageUnits () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the virtual pixel method + * @link https://php.net/manual/en/imagick.getimagevirtualpixelmethod.php + * @return int the virtual pixel method on success. + */ + public function getImageVirtualPixelMethod () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the chromaticity white point + * @link https://php.net/manual/en/imagick.getimagewhitepoint.php + * @return array the chromaticity white point as an associative array with the keys + * "x" and "y". + */ + public function getImageWhitePoint () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the image width + * @link https://php.net/manual/en/imagick.getimagewidth.php + * @return int the image width. + */ + public function getImageWidth () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the number of images in the object + * @link https://php.net/manual/en/imagick.getnumberimages.php + * @return int the number of images associated with Imagick object. + */ + public function getNumberImages () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the image total ink density + * @link https://php.net/manual/en/imagick.getimagetotalinkdensity.php + * @return float the image total ink density of the image. + * Throw an ImagickException on error. + * @throws ImagickException on error + */ + public function getImageTotalInkDensity () {} + + /** + * (PECL imagick 2.0.0)
+ * Extracts a region of the image + * @link https://php.net/manual/en/imagick.getimageregion.php + * @param int $width

+ * The width of the extracted region. + *

+ * @param int $height

+ * The height of the extracted region. + *

+ * @param int $x

+ * X-coordinate of the top-left corner of the extracted region. + *

+ * @param int $y

+ * Y-coordinate of the top-left corner of the extracted region. + *

+ * @return Imagick Extracts a region of the image and returns it as a new wand. + */ + public function getImageRegion ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a new image as a copy + * @link https://php.net/manual/en/imagick.implodeimage.php + * @param float $radius

+ * The radius of the implode + *

+ * @return bool TRUE on success. + */ + public function implodeImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Adjusts the levels of an image + * @link https://php.net/manual/en/imagick.levelimage.php + * @param float $blackPoint

+ * The image black point + *

+ * @param float $gamma

+ * The gamma value + *

+ * @param float $whitePoint

+ * The image white point + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function levelImage ($blackPoint, $gamma, $whitePoint, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Scales an image proportionally 2x + * @link https://php.net/manual/en/imagick.magnifyimage.php + * @return bool TRUE on success. + */ + public function magnifyImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Replaces the colors of an image with the closest color from a reference image. + * @link https://php.net/manual/en/imagick.mapimage.php + * @param Imagick $map + * @param bool $dither + * @return bool TRUE on success. + */ + public function mapImage (Imagick $map, $dither) {} + + /** + * (PECL imagick 2.0.0)
+ * Changes the transparency value of a color + * @link https://php.net/manual/en/imagick.mattefloodfillimage.php + * @param float $alpha

+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *

+ * @param float $fuzz

+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *

+ * @param mixed $bordercolor

+ * An ImagickPixel object or string representing the border color. + *

+ * @param int $x

+ * The starting x coordinate of the operation. + *

+ * @param int $y

+ * The starting y coordinate of the operation. + *

+ * @return bool TRUE on success. + */ + public function matteFloodfillImage ($alpha, $fuzz, $bordercolor, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Applies a digital filter + * @link https://php.net/manual/en/imagick.medianfilterimage.php + * @param float $radius

+ * The radius of the pixel neighborhood. + *

+ * @return bool TRUE on success. + */ + public function medianFilterImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Negates the colors in the reference image + * @link https://php.net/manual/en/imagick.negateimage.php + * @param bool $gray

+ * Whether to only negate grayscale pixels within the image. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function negateImage ($gray, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Change any pixel that matches color + * @link https://php.net/manual/en/imagick.paintopaqueimage.php + * @param mixed $target

+ * Change this target color to the fill color within the image. An + * ImagickPixel object or a string representing the target color. + *

+ * @param mixed $fill

+ * An ImagickPixel object or a string representing the fill color. + *

+ * @param float $fuzz

+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *

+ * @param int $channel [optional]

+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *

+ * @return bool TRUE on success. + */ + public function paintOpaqueImage ($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Changes any pixel that matches color with the color defined by fill + * @link https://php.net/manual/en/imagick.painttransparentimage.php + * @param mixed $target

+ * Change this target color to specified opacity value within the image. + *

+ * @param float $alpha

+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *

+ * @param float $fuzz

+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *

+ * @return bool TRUE on success. + */ + public function paintTransparentImage ($target, $alpha, $fuzz) {} + + /** + * (PECL imagick 2.0.0)
+ * Quickly pin-point appropriate parameters for image processing + * @link https://php.net/manual/en/imagick.previewimages.php + * @param int $preview

+ * Preview type. See Preview type constants + *

+ * @return bool TRUE on success. + */ + public function previewImages ($preview) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds or removes a profile from an image + * @link https://php.net/manual/en/imagick.profileimage.php + * @param string $name + * @param string $profile + * @return bool TRUE on success. + */ + public function profileImage ($name, $profile) {} + + /** + * (PECL imagick 2.0.0)
+ * Analyzes the colors within a reference image + * @link https://php.net/manual/en/imagick.quantizeimage.php + * @param int $numberColors + * @param int $colorspace + * @param int $treedepth + * @param bool $dither + * @param bool $measureError + * @return bool TRUE on success. + */ + public function quantizeImage ($numberColors, $colorspace, $treedepth, $dither, $measureError) {} + + /** + * (PECL imagick 2.0.0)
+ * Analyzes the colors within a sequence of images + * @link https://php.net/manual/en/imagick.quantizeimages.php + * @param int $numberColors + * @param int $colorspace + * @param int $treedepth + * @param bool $dither + * @param bool $measureError + * @return bool TRUE on success. + */ + public function quantizeImages ($numberColors, $colorspace, $treedepth, $dither, $measureError) {} + + /** + * (PECL imagick 2.0.0)
+ * Smooths the contours of an image + * @link https://php.net/manual/en/imagick.reducenoiseimage.php + * @param float $radius + * @return bool TRUE on success. + */ + public function reduceNoiseImage ($radius) {} + + /** + * (PECL imagick 2.0.0)
+ * Removes the named image profile and returns it + * @link https://php.net/manual/en/imagick.removeimageprofile.php + * @param string $name + * @return string a string containing the profile of the image. + */ + public function removeImageProfile ($name) {} + + /** + * (PECL imagick 2.0.0)
+ * Separates a channel from the image + * @link https://php.net/manual/en/imagick.separateimagechannel.php + * @param int $channel + * @return bool TRUE on success. + */ + public function separateImageChannel ($channel) {} + + /** + * (PECL imagick 2.0.0)
+ * Sepia tones an image + * @link https://php.net/manual/en/imagick.sepiatoneimage.php + * @param float $threshold + * @return bool TRUE on success. + */ + public function sepiaToneImage ($threshold) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image bias for any method that convolves an image + * @link https://php.net/manual/en/imagick.setimagebias.php + * @param float $bias + * @return bool TRUE on success. + */ + public function setImageBias ($bias) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image chromaticity blue primary point + * @link https://php.net/manual/en/imagick.setimageblueprimary.php + * @param float $x + * @param float $y + * @return bool TRUE on success. + */ + public function setImageBluePrimary ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image border color + * @link https://php.net/manual/en/imagick.setimagebordercolor.php + * @param mixed $border

+ * The border color + *

+ * @return bool TRUE on success. + */ + public function setImageBorderColor ($border) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the depth of a particular image channel + * @link https://php.net/manual/en/imagick.setimagechanneldepth.php + * @param int $channel + * @param int $depth + * @return bool TRUE on success. + */ + public function setImageChannelDepth ($channel, $depth) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the color of the specified colormap index + * @link https://php.net/manual/en/imagick.setimagecolormapcolor.php + * @param int $index + * @param ImagickPixel $color + * @return bool TRUE on success. + */ + public function setImageColormapColor ($index, ImagickPixel $color) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image colorspace + * @link https://php.net/manual/en/imagick.setimagecolorspace.php + * @param int $colorspace

+ * One of the COLORSPACE constants + *

+ * @return bool TRUE on success. + */ + public function setImageColorspace ($colorspace) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image disposal method + * @link https://php.net/manual/en/imagick.setimagedispose.php + * @param int $dispose + * @return bool TRUE on success. + */ + public function setImageDispose ($dispose) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image size + * @link https://php.net/manual/en/imagick.setimageextent.php + * @param int $columns + * @param int $rows + * @return bool TRUE on success. + */ + public function setImageExtent ($columns, $rows) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image chromaticity green primary point + * @link https://php.net/manual/en/imagick.setimagegreenprimary.php + * @param float $x + * @param float $y + * @return bool TRUE on success. + */ + public function setImageGreenPrimary ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image compression + * @link https://php.net/manual/en/imagick.setimageinterlacescheme.php + * @param int $interlace_scheme + * @return bool TRUE on success. + */ + public function setImageInterlaceScheme ($interlace_scheme) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a named profile to the Imagick object + * @link https://php.net/manual/en/imagick.setimageprofile.php + * @param string $name + * @param string $profile + * @return bool TRUE on success. + */ + public function setImageProfile ($name, $profile) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image chromaticity red primary point + * @link https://php.net/manual/en/imagick.setimageredprimary.php + * @param float $x + * @param float $y + * @return bool TRUE on success. + */ + public function setImageRedPrimary ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image rendering intent + * @link https://php.net/manual/en/imagick.setimagerenderingintent.php + * @param int $rendering_intent + * @return bool TRUE on success. + */ + public function setImageRenderingIntent ($rendering_intent) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image virtual pixel method + * @link https://php.net/manual/en/imagick.setimagevirtualpixelmethod.php + * @param int $method + * @return bool TRUE on success. + */ + public function setImageVirtualPixelMethod ($method) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image chromaticity white point + * @link https://php.net/manual/en/imagick.setimagewhitepoint.php + * @param float $x + * @param float $y + * @return bool TRUE on success. + */ + public function setImageWhitePoint ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Adjusts the contrast of an image + * @link https://php.net/manual/en/imagick.sigmoidalcontrastimage.php + * @param bool $sharpen + * @param float $alpha + * @param float $beta + * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function sigmoidalContrastImage ($sharpen, $alpha, $beta, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Composites two images + * @link https://php.net/manual/en/imagick.stereoimage.php + * @param Imagick $offset_wand + * @return bool TRUE on success. + */ + public function stereoImage (Imagick $offset_wand) {} + + /** + * (PECL imagick 2.0.0)
+ * Repeatedly tiles the texture image + * @link https://php.net/manual/en/imagick.textureimage.php + * @param Imagick $texture_wand + * @return bool TRUE on success. + */ + public function textureImage (Imagick $texture_wand) {} + + /** + * pplies a color vector to each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied. + * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 + * @link https://php.net/manual/en/imagick.tintimage.php + * @param mixed $tint + * @param mixed $opacity + * @param bool $legacy [optional] + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function tintImage ($tint, $opacity, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)
+ * Sharpens an image + * @link https://php.net/manual/en/imagick.unsharpmaskimage.php + * @param float $radius + * @param float $sigma + * @param float $amount + * @param float $threshold + * @param int $channel [optional] + * @return bool TRUE on success. + */ + public function unsharpMaskImage ($radius, $sigma, $amount, $threshold, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a new Imagick object + * @link https://php.net/manual/en/imagick.getimage.php + * @return Imagick a new Imagick object with the current image sequence. + */ + public function getImage () {} + + /** + * (PECL imagick 2.0.0)
+ * Adds new image to Imagick object image list + * @link https://php.net/manual/en/imagick.addimage.php + * @param Imagick $source

+ * The source Imagick object + *

+ * @return bool TRUE on success. + */ + public function addImage (Imagick $source) {} + + /** + * (PECL imagick 2.0.0)
+ * Replaces image in the object + * @link https://php.net/manual/en/imagick.setimage.php + * @param Imagick $replace

+ * The replace Imagick object + *

+ * @return bool TRUE on success. + */ + public function setImage (Imagick $replace) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a new image + * @link https://php.net/manual/en/imagick.newimage.php + * @param int $cols

+ * Columns in the new image + *

+ * @param int $rows

+ * Rows in the new image + *

+ * @param mixed $background

+ * The background color used for this image + *

+ * @param string $format [optional]

+ * Image format. This parameter was added in Imagick version 2.0.1. + *

+ * @return bool TRUE on success. + */ + public function newImage ($cols, $rows, $background, $format = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Creates a new image + * @link https://php.net/manual/en/imagick.newpseudoimage.php + * @param int $columns

+ * columns in the new image + *

+ * @param int $rows

+ * rows in the new image + *

+ * @param string $pseudoString

+ * string containing pseudo image definition. + *

+ * @return bool TRUE on success. + */ + public function newPseudoImage ($columns, $rows, $pseudoString) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the object compression type + * @link https://php.net/manual/en/imagick.getcompression.php + * @return int the compression constant + */ + public function getCompression () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the object compression quality + * @link https://php.net/manual/en/imagick.getcompressionquality.php + * @return int integer describing the compression quality + */ + public function getCompressionQuality () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the ImageMagick API copyright as a string + * @link https://php.net/manual/en/imagick.getcopyright.php + * @return string a string containing the copyright notice of Imagemagick and + * Magickwand C API. + */ + public static function getCopyright () {} + + /** + * (PECL imagick 2.0.0)
+ * The filename associated with an image sequence + * @link https://php.net/manual/en/imagick.getfilename.php + * @return string a string on success. + */ + public function getFilename () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the format of the Imagick object + * @link https://php.net/manual/en/imagick.getformat.php + * @return string the format of the image. + */ + public function getFormat () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the ImageMagick home URL + * @link https://php.net/manual/en/imagick.gethomeurl.php + * @return string a link to the imagemagick homepage. + */ + public static function getHomeURL () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the object interlace scheme + * @link https://php.net/manual/en/imagick.getinterlacescheme.php + * @return int Gets the wand interlace + * scheme. + */ + public function getInterlaceScheme () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a value associated with the specified key + * @link https://php.net/manual/en/imagick.getoption.php + * @param string $key

+ * The name of the option + *

+ * @return string a value associated with a wand and the specified key. + */ + public function getOption ($key) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the ImageMagick package name + * @link https://php.net/manual/en/imagick.getpackagename.php + * @return string the ImageMagick package name as a string. + */ + public static function getPackageName () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the page geometry + * @link https://php.net/manual/en/imagick.getpage.php + * @return array the page geometry associated with the Imagick object in + * an associative array with the keys "width", "height", "x", and "y", + * throwing ImagickException on error. + * @throws ImagickException on error + */ + public function getPage () {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the quantum depth + * @link https://php.net/manual/en/imagick.getquantumdepth.php + * @return array the Imagick quantum depth as a string. + */ + public static function getQuantumDepth () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the Imagick quantum range + * @link https://php.net/manual/en/imagick.getquantumrange.php + * @return array the Imagick quantum range as a string. + */ + public static function getQuantumRange () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the ImageMagick release date + * @link https://php.net/manual/en/imagick.getreleasedate.php + * @return string the ImageMagick release date as a string. + */ + public static function getReleaseDate () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the specified resource's memory usage + * @link https://php.net/manual/en/imagick.getresource.php + * @param int $type

+ * Refer to the list of resourcetype constants. + *

+ * @return int the specified resource's memory usage in megabytes. + */ + public static function getResource ($type) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the specified resource limit + * @link https://php.net/manual/en/imagick.getresourcelimit.php + * @param int $type

+ * Refer to the list of resourcetype constants. + *

+ * @return int the specified resource limit in megabytes. + */ + public static function getResourceLimit ($type) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the horizontal and vertical sampling factor + * @link https://php.net/manual/en/imagick.getsamplingfactors.php + * @return array an associative array with the horizontal and vertical sampling + * factors of the image. + */ + public function getSamplingFactors () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the size associated with the Imagick object + * @link https://php.net/manual/en/imagick.getsize.php + * @return array the size associated with the Imagick object as an array with the + * keys "columns" and "rows". + */ + public function getSize () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the ImageMagick API version + * @link https://php.net/manual/en/imagick.getversion.php + * @return array the ImageMagick API version as a string and as a number. + */ + public static function getVersion () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the object's default background color + * @link https://php.net/manual/en/imagick.setbackgroundcolor.php + * @param mixed $background + * @return bool TRUE on success. + */ + public function setBackgroundColor ($background) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the object's default compression type + * @link https://php.net/manual/en/imagick.setcompression.php + * @param int $compression + * @return bool TRUE on success. + */ + public function setCompression ($compression) {} + + /** + * (PECL imagick 0.9.10-0.9.9)
+ * Sets the object's default compression quality + * @link https://php.net/manual/en/imagick.setcompressionquality.php + * @param int $quality + * @return bool TRUE on success. + */ + public function setCompressionQuality ($quality) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the filename before you read or write the image + * @link https://php.net/manual/en/imagick.setfilename.php + * @param string $filename + * @return bool TRUE on success. + */ + public function setFilename ($filename) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the format of the Imagick object + * @link https://php.net/manual/en/imagick.setformat.php + * @param string $format + * @return bool TRUE on success. + */ + public function setFormat ($format) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image compression + * @link https://php.net/manual/en/imagick.setinterlacescheme.php + * @param int $interlace_scheme + * @return bool TRUE on success. + */ + public function setInterlaceScheme ($interlace_scheme) {} + + /** + * (PECL imagick 2.0.0)
+ * Set an option + * @link https://php.net/manual/en/imagick.setoption.php + * @param string $key + * @param string $value + * @return bool TRUE on success. + */ + public function setOption ($key, $value) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the page geometry of the Imagick object + * @link https://php.net/manual/en/imagick.setpage.php + * @param int $width + * @param int $height + * @param int $x + * @param int $y + * @return bool TRUE on success. + */ + public function setPage ($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the limit for a particular resource in megabytes + * @link https://php.net/manual/en/imagick.setresourcelimit.php + * @param int $type

+ * Refer to the list of resourcetype constants. + *

+ * @param int $limit

+ * The resource limit. The unit depends on the type of the resource being limited. + *

+ * @return bool TRUE on success. + */ + public static function setResourceLimit ($type, $limit) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image resolution + * @link https://php.net/manual/en/imagick.setresolution.php + * @param float $x_resolution

+ * The horizontal resolution. + *

+ * @param float $y_resolution

+ * The vertical resolution. + *

+ * @return bool TRUE on success. + */ + public function setResolution ($x_resolution, $y_resolution) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image sampling factors + * @link https://php.net/manual/en/imagick.setsamplingfactors.php + * @param array $factors + * @return bool TRUE on success. + */ + public function setSamplingFactors (array $factors) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the size of the Imagick object + * @link https://php.net/manual/en/imagick.setsize.php + * @param int $columns + * @param int $rows + * @return bool TRUE on success. + */ + public function setSize ($columns, $rows) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the image type attribute + * @link https://php.net/manual/en/imagick.settype.php + * @param int $image_type + * @return bool TRUE on success. + */ + public function setType ($image_type) {} + + public function key () {} + + public function next () {} + + public function rewind () {} + + /** + * (PECL imagick 2.0.0)
+ * Checks if the current item is valid + * @link https://php.net/manual/en/imagick.valid.php + * @return bool TRUE on success. + */ + public function valid () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a reference to the current Imagick object + * @link https://php.net/manual/en/imagick.current.php + * @return Imagick self on success. + */ + public function current () {} + + /** + * Change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image. + * @link https://php.net/manual/en/imagick.brightnesscontrastimage.php + * @param string $brightness + * @param string $contrast + * @param int $CHANNEL [optional] + * @return void + * @since 3.3.0 + */ + public function brightnessContrastImage ($brightness, $contrast, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } + + /** + * Applies a user supplied kernel to the image according to the given morphology method. + * @link https://php.net/manual/en/imagick.morphology.php + * @param int $morphologyMethod Which morphology method to use one of the \Imagick::MORPHOLOGY_* constants. + * @param int $iterations The number of iteration to apply the morphology function. A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1. + * @param ImagickKernel $ImagickKernel + * @param int $CHANNEL [optional] + * @return void + * @since 3.3.0 + */ + public function morphology ($morphologyMethod, $iterations, ImagickKernel $ImagickKernel, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } + + /** + * Applies a custom convolution kernel to the image. + * @link https://php.net/manual/en/imagick.filter.php + * @param ImagickKernel $ImagickKernel An instance of ImagickKernel that represents either a single kernel or a linked series of kernels. + * @param int $CHANNEL [optional] Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + * @return void + * @since 3.3.0 + */ + public function filter (ImagickKernel $ImagickKernel , $CHANNEL = Imagick::CHANNEL_DEFAULT) { } + + /** + * Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). + * The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255) + * @link https://php.net/manual/en/imagick.colormatriximage.php + * @param string $color_matrix + * @return void + * @since 3.3.0 + */ + public function colorMatrixImage ($color_matrix = Imagick::CHANNEL_DEFAULT) { } + + /** + * Deletes an image property. + * @link https://php.net/manual/en/imagick.deleteimageproperty.php + * @param string $name The name of the property to delete. + * @return void + * @since 3.3.0 + */ + public function deleteImageProperty ($name) { } + + /** + * Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. + * @link https://php.net/manual/en/imagick.forwardfouriertransformimage.php + * @param bool $magnitude If true, return as magnitude / phase pair otherwise a real / imaginary image pair. + * @return void + * @since 3.3.0 + */ + public function forwardFourierTransformimage ($magnitude) { } + + /** + * Gets the current image's compression type. + * @link https://php.net/manual/en/imagick.getimagecompression.php + * @return int + * @since 3.3.0 + */ + public function getImageCompression () { } + + /** + * Get the StringRegistry entry for the named key or false if not set. + * @link https://php.net/manual/en/imagick.getregistry.php + * @param string $key + * @return string|false + * @throws Exception Since version >=3.4.3. Throws an exception if the key does not exist, rather than terminating the program. + * @since 3.3.0 + */ + public static function getRegistry ($key) { } + + /** + * Returns the ImageMagick quantum range as an integer. + * @link https://php.net/manual/en/imagick.getquantum.php + * @return int + * @since 3.3.0 + */ + public static function getQuantum () { } + + /** + * Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See https://www.imagemagick.org/script/escape.php for escape sequences. + * @link https://php.net/manual/en/imagick.identifyformat.php + * @see https://www.imagemagick.org/script/escape.php + * @param string $embedText A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k". + * @return bool + * @since 3.3.0 + */ + public function identifyFormat ($embedText) { } + + /** + * Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. + * @link https://php.net/manual/en/imagick.inversefouriertransformimage.php + * @param Imagick $complement The second image to combine with this one to form either the magnitude / phase or real / imaginary image pair. + * @param bool $magnitude If true, combine as magnitude / phase pair otherwise a real / imaginary image pair. + * @return void + * @since 3.3.0 + */ + public function inverseFourierTransformImage ($complement, $magnitude) { } + + /** + * List all the registry settings. Returns an array of all the key/value pairs in the registry + * @link https://php.net/manual/en/imagick.listregistry.php + * @return array An array containing the key/values from the registry. + * @since 3.3.0 + */ + public static function listRegistry () { } + + /** + * Rotational blurs an image. + * @link https://php.net/manual/en/imagick.rotationalblurimage.php + * @param string $angle + * @param string $CHANNEL + * @return void + * @since 3.3.0 + */ + public function rotationalBlurImage ($angle, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } + + /** + * Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold. + * @link https://php.net/manual/en/imagick.selectiveblurimage.php + * @param float $radius + * @param float $sigma + * @param float $threshold + * @param int $CHANNEL Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + * @return void + * @since 3.3.0 + */ + public function selectiveBlurImage ($radius, $sigma, $threshold, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } + + /** + * Set whether antialiasing should be used for operations. On by default. + * @param bool $antialias + * @return int + * @since 3.3.0 + */ + public function setAntiAlias ($antialias) { } + + /** + * @link https://php.net/manual/en/imagick.setimagebiasquantum.php + * @param string $bias + * @return void + * @since 3.3.0 + */ + public function setImageBiasQuantum ($bias) { } + + /** + * Set a callback that will be called during the processing of the Imagick image. + * @link https://php.net/manual/en/imagick.setprogressmonitor.php + * @param callable $callback The progress function to call. It should return true if image processing should continue, or false if it should be cancelled. + * The offset parameter indicates the progress and the span parameter indicates the total amount of work needed to be done. + *
 bool callback ( mixed $offset , mixed $span ) 
+ * Caution + * The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial. + * @return void + * @since 3.3.0 + */ + public function setProgressMonitor ($callback) { } + + /** + * Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs. + * @link https://php.net/manual/en/imagick.setregistry.php + * @param string $key + * @param string $value + * @return void + * @since 3.3.0 + */ + public static function setRegistry ($key, $value) { } + + /** + * Replace each pixel with corresponding statistic from the neighborhood of the specified width and height. + * @link https://php.net/manual/en/imagick.statisticimage.php + * @param int $type + * @param int $width + * @param int $height + * @param int $channel [optional] + * @return void + * @since 3.3.0 + */ + public function statisticImage ($type, $width, $height, $channel = Imagick::CHANNEL_DEFAULT ) { } + + /** + * Searches for a subimage in the current image and returns a similarity image such that an exact match location is + * completely white and if none of the pixels match, black, otherwise some gray level in-between. + * You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will + * be set to the 'score' of the similarity between the subimage and the matching position in the larger image, + * bestMatch will contain an associative array with elements x, y, width, height that describe the matching region. + * + * @link https://php.net/manual/en/imagick.subimagematch.php + * @param Imagick $imagick + * @param array $bestMatch [optional] + * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. + * @param float $similarity_threshold [optional] Only used if compiled with ImageMagick (library) > 7 + * @param int $metric [optional] Only used if compiled with ImageMagick (library) > 7 + * @return Imagick + * @since 3.3.0 + */ + public function subImageMatch (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } + + /** + * Is an alias of Imagick::subImageMatch + * + * @param Imagick $imagick + * @param array $bestMatch [optional] + * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. + * @param float $similarity_threshold [optional] + * @param int $metric [optional] + * @return Imagick + * @see Imagick::subImageMatch() This function is an alias of subImageMatch() + * @since 3.4.0 + */ + public function similarityImage (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } + + /** + * Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc. + * @return string + * @since 3.4.0 + */ + public function getConfigureOptions () { } + + /** + * GetFeatures() returns the ImageMagick features that have been compiled into the runtime. + * @return string + * @since 3.4.0 + */ + public function getFeatures () { } + + /** + * @return int + * @since 3.4.0 + */ + public function getHDRIEnabled () { } + + /** + * Sets the image channel mask. Returns the previous set channel mask. + * Only works with Imagick >=7 + * @param int $channel + * @since 3.4.0 + */ + public function setImageChannelMask ($channel) {} + + /** + * Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence + * @param int $EVALUATE_CONSTANT + * @return bool + * @see https://www.imagemagick.org/Usage/layers/#evaluate-sequence + * @since 3.4.0 + */ + public function evaluateImages ($EVALUATE_CONSTANT) { } + + /** + * Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately. + * @param int $channel [optional] Default value Imagick::CHANNEL_ALL + * @return bool + * @since 3.4.1 + */ + public function autoGammaImage ($channel = Imagick::CHANNEL_ALL) { } + + /** + * Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation). + * @return bool + * @since 3.4.1 + */ + public function autoOrient () { } + + /** + * Composite one image onto another using the specified gravity. + * + * @param Imagick $imagick + * @param int $COMPOSITE_CONSTANT + * @param int $GRAVITY_CONSTANT + * @return bool + * @since 3.4.1 + */ + public function compositeImageGravity(Imagick $imagick, $COMPOSITE_CONSTANT, $GRAVITY_CONSTANT) { } + + /** + * Attempts to increase the appearance of large-scale light-dark transitions. + * + * @param float $radius + * @param float $strength + * @return bool + * @since 3.4.1 + */ + public function localContrastImage($radius, $strength) { } + + /** + * Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants + * @return int + * @since 3.4.3 + */ + public function identifyImageType() { } + + /** + * Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity() + * + * @param float $alpha + * @return bool + * @since 3.4.3 + */ + public function setImageAlpha($alpha) { } +} + +/** + * @method ImagickDraw clone() (PECL imagick 2.0.0)
Makes an exact copy of the specified ImagickDraw object + * @link https://php.net/manual/en/class.imagickdraw.php + */ +class ImagickDraw { + + public function resetVectorGraphics () {} + + public function getTextKerning () {} + + /** + * @param $kerning + */ + public function setTextKerning ($kerning) {} + + public function getTextInterWordSpacing () {} + + /** + * @param $spacing + */ + public function setTextInterWordSpacing ($spacing) {} + + public function getTextInterLineSpacing () {} + + /** + * @param $spacing + */ + public function setTextInterLineSpacing ($spacing) {} + + /** + * (PECL imagick 2.0.0)
+ * The ImagickDraw constructor + * @link https://php.net/manual/en/imagickdraw.construct.php + */ + public function __construct () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the fill color to be used for drawing filled objects + * @link https://php.net/manual/en/imagickdraw.setfillcolor.php + * @param ImagickPixel $fill_pixel

+ * ImagickPixel to use to set the color + *

+ * @return bool No value is returned. + */ + public function setFillColor (ImagickPixel $fill_pixel) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the opacity to use when drawing using the fill color or fill texture + * @link https://php.net/manual/en/imagickdraw.setfillalpha.php + * @param float $opacity

+ * fill alpha + *

+ * @return bool No value is returned. + */ + public function setFillAlpha ($opacity) {} + + /** + * @param $x_resolution + * @param $y_resolution + */ + public function setResolution ($x_resolution, $y_resolution) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the color used for stroking object outlines + * @link https://php.net/manual/en/imagickdraw.setstrokecolor.php + * @param ImagickPixel $stroke_pixel

+ * the stroke color + *

+ * @return bool No value is returned. + */ + public function setStrokeColor (ImagickPixel $stroke_pixel) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the opacity of stroked object outlines + * @link https://php.net/manual/en/imagickdraw.setstrokealpha.php + * @param float $opacity

+ * opacity + *

+ * @return bool No value is returned. + */ + public function setStrokeAlpha ($opacity) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the width of the stroke used to draw object outlines + * @link https://php.net/manual/en/imagickdraw.setstrokewidth.php + * @param float $stroke_width

+ * stroke width + *

+ * @return bool No value is returned. + */ + public function setStrokeWidth ($stroke_width) {} + + /** + * (PECL imagick 2.0.0)
+ * Clears the ImagickDraw + * @link https://php.net/manual/en/imagickdraw.clear.php + * @return bool an ImagickDraw object. + */ + public function clear () {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a circle + * @link https://php.net/manual/en/imagickdraw.circle.php + * @param float $ox

+ * origin x coordinate + *

+ * @param float $oy

+ * origin y coordinate + *

+ * @param float $px

+ * perimeter x coordinate + *

+ * @param float $py

+ * perimeter y coordinate + *

+ * @return bool No value is returned. + */ + public function circle ($ox, $oy, $px, $py) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws text on the image + * @link https://php.net/manual/en/imagickdraw.annotation.php + * @param float $x

+ * The x coordinate where text is drawn + *

+ * @param float $y

+ * The y coordinate where text is drawn + *

+ * @param string $text

+ * The text to draw on the image + *

+ * @return bool No value is returned. + */ + public function annotation ($x, $y, $text) {} + + /** + * (PECL imagick 2.0.0)
+ * Controls whether text is antialiased + * @link https://php.net/manual/en/imagickdraw.settextantialias.php + * @param bool $antiAlias + * @return bool No value is returned. + */ + public function setTextAntialias ($antiAlias) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies specifies the text code set + * @link https://php.net/manual/en/imagickdraw.settextencoding.php + * @param string $encoding

+ * the encoding name + *

+ * @return bool No value is returned. + */ + public function setTextEncoding ($encoding) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the fully-specified font to use when annotating with text + * @link https://php.net/manual/en/imagickdraw.setfont.php + * @param string $font_name + * @return bool TRUE on success. + */ + public function setFont ($font_name) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the font family to use when annotating with text + * @link https://php.net/manual/en/imagickdraw.setfontfamily.php + * @param string $font_family

+ * the font family + *

+ * @return bool TRUE on success. + */ + public function setFontFamily ($font_family) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the font pointsize to use when annotating with text + * @link https://php.net/manual/en/imagickdraw.setfontsize.php + * @param float $pointsize

+ * the point size + *

+ * @return bool No value is returned. + */ + public function setFontSize ($pointsize) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the font style to use when annotating with text + * @link https://php.net/manual/en/imagickdraw.setfontstyle.php + * @param int $style

+ * STYLETYPE_ constant + *

+ * @return bool No value is returned. + */ + public function setFontStyle ($style) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the font weight + * @link https://php.net/manual/en/imagickdraw.setfontweight.php + * @param int $font_weight + * @return bool + */ + public function setFontWeight ($font_weight) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the font + * @link https://php.net/manual/en/imagickdraw.getfont.php + * @return string|false a string on success and false if no font is set. + */ + public function getFont () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the font family + * @link https://php.net/manual/en/imagickdraw.getfontfamily.php + * @return string|false the font family currently selected or false if font family is not set. + */ + public function getFontFamily () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the font pointsize + * @link https://php.net/manual/en/imagickdraw.getfontsize.php + * @return float the font size associated with the current ImagickDraw object. + */ + public function getFontSize () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the font style + * @link https://php.net/manual/en/imagickdraw.getfontstyle.php + * @return int the font style constant (STYLE_) associated with the ImagickDraw object + * or 0 if no style is set. + */ + public function getFontStyle () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the font weight + * @link https://php.net/manual/en/imagickdraw.getfontweight.php + * @return int an int on success and 0 if no weight is set. + */ + public function getFontWeight () {} + + /** + * (PECL imagick 2.0.0)
+ * Frees all associated resources + * @link https://php.net/manual/en/imagickdraw.destroy.php + * @return bool No value is returned. + */ + public function destroy () {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a rectangle + * @link https://php.net/manual/en/imagickdraw.rectangle.php + * @param float $x1

+ * x coordinate of the top left corner + *

+ * @param float $y1

+ * y coordinate of the top left corner + *

+ * @param float $x2

+ * x coordinate of the bottom right corner + *

+ * @param float $y2

+ * y coordinate of the bottom right corner + *

+ * @return bool No value is returned. + */ + public function rectangle ($x1, $y1, $x2, $y2) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a rounded rectangle + * @link https://php.net/manual/en/imagickdraw.roundrectangle.php + * @param float $x1

+ * x coordinate of the top left corner + *

+ * @param float $y1

+ * y coordinate of the top left corner + *

+ * @param float $x2

+ * x coordinate of the bottom right + *

+ * @param float $y2

+ * y coordinate of the bottom right + *

+ * @param float $rx

+ * x rounding + *

+ * @param float $ry

+ * y rounding + *

+ * @return bool No value is returned. + */ + public function roundRectangle ($x1, $y1, $x2, $y2, $rx, $ry) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws an ellipse on the image + * @link https://php.net/manual/en/imagickdraw.ellipse.php + * @param float $ox + * @param float $oy + * @param float $rx + * @param float $ry + * @param float $start + * @param float $end + * @return bool No value is returned. + */ + public function ellipse ($ox, $oy, $rx, $ry, $start, $end) {} + + /** + * (PECL imagick 2.0.0)
+ * Skews the current coordinate system in the horizontal direction + * @link https://php.net/manual/en/imagickdraw.skewx.php + * @param float $degrees

+ * degrees to skew + *

+ * @return bool No value is returned. + */ + public function skewX ($degrees) {} + + /** + * (PECL imagick 2.0.0)
+ * Skews the current coordinate system in the vertical direction + * @link https://php.net/manual/en/imagickdraw.skewy.php + * @param float $degrees

+ * degrees to skew + *

+ * @return bool No value is returned. + */ + public function skewY ($degrees) {} + + /** + * (PECL imagick 2.0.0)
+ * Applies a translation to the current coordinate system + * @link https://php.net/manual/en/imagickdraw.translate.php + * @param float $x

+ * horizontal translation + *

+ * @param float $y

+ * vertical translation + *

+ * @return bool No value is returned. + */ + public function translate ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a line + * @link https://php.net/manual/en/imagickdraw.line.php + * @param float $sx

+ * starting x coordinate + *

+ * @param float $sy

+ * starting y coordinate + *

+ * @param float $ex

+ * ending x coordinate + *

+ * @param float $ey

+ * ending y coordinate + *

+ * @return bool No value is returned. + */ + public function line ($sx, $sy, $ex, $ey) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws an arc + * @link https://php.net/manual/en/imagickdraw.arc.php + * @param float $sx

+ * Starting x ordinate of bounding rectangle + *

+ * @param float $sy

+ * starting y ordinate of bounding rectangle + *

+ * @param float $ex

+ * ending x ordinate of bounding rectangle + *

+ * @param float $ey

+ * ending y ordinate of bounding rectangle + *

+ * @param float $sd

+ * starting degrees of rotation + *

+ * @param float $ed

+ * ending degrees of rotation + *

+ * @return bool No value is returned. + */ + public function arc ($sx, $sy, $ex, $ey, $sd, $ed) {} + + /** + * (PECL imagick 2.0.0)
+ * Paints on the image's opacity channel + * @link https://php.net/manual/en/imagickdraw.matte.php + * @param float $x

+ * x coordinate of the matte + *

+ * @param float $y

+ * y coordinate of the matte + *

+ * @param int $paintMethod

+ * PAINT_ constant + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function matte ($x, $y, $paintMethod) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a polygon + * @link https://php.net/manual/en/imagickdraw.polygon.php + * @param array $coordinates

+ * multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) ); + *

+ * @return bool TRUE on success. + */ + public function polygon (array $coordinates) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a point + * @link https://php.net/manual/en/imagickdraw.point.php + * @param float $x

+ * point's x coordinate + *

+ * @param float $y

+ * point's y coordinate + *

+ * @return bool No value is returned. + */ + public function point ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the text decoration + * @link https://php.net/manual/en/imagickdraw.gettextdecoration.php + * @return int one of the DECORATION_ constants + * and 0 if no decoration is set. + */ + public function getTextDecoration () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the code set used for text annotations + * @link https://php.net/manual/en/imagickdraw.gettextencoding.php + * @return string a string specifying the code set + * or false if text encoding is not set. + */ + public function getTextEncoding () {} + + public function getFontStretch () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the font stretch to use when annotating with text + * @link https://php.net/manual/en/imagickdraw.setfontstretch.php + * @param int $fontStretch

+ * STRETCH_ constant + *

+ * @return bool No value is returned. + */ + public function setFontStretch ($fontStretch) {} + + /** + * (PECL imagick 2.0.0)
+ * Controls whether stroked outlines are antialiased + * @link https://php.net/manual/en/imagickdraw.setstrokeantialias.php + * @param bool $stroke_antialias

+ * the antialias setting + *

+ * @return bool No value is returned. + */ + public function setStrokeAntialias ($stroke_antialias) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies a text alignment + * @link https://php.net/manual/en/imagickdraw.settextalignment.php + * @param int $alignment

+ * ALIGN_ constant + *

+ * @return bool No value is returned. + */ + public function setTextAlignment ($alignment) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies a decoration + * @link https://php.net/manual/en/imagickdraw.settextdecoration.php + * @param int $decoration

+ * DECORATION_ constant + *

+ * @return bool No value is returned. + */ + public function setTextDecoration ($decoration) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the color of a background rectangle + * @link https://php.net/manual/en/imagickdraw.settextundercolor.php + * @param ImagickPixel $under_color

+ * the under color + *

+ * @return bool No value is returned. + */ + public function setTextUnderColor (ImagickPixel $under_color) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the overall canvas size + * @link https://php.net/manual/en/imagickdraw.setviewbox.php + * @param int $x1

+ * left x coordinate + *

+ * @param int $y1

+ * left y coordinate + *

+ * @param int $x2

+ * right x coordinate + *

+ * @param int $y2

+ * right y coordinate + *

+ * @return bool No value is returned. + */ + public function setViewbox ($x1, $y1, $x2, $y2) {} + + /** + * (PECL imagick 2.0.0)
+ * Adjusts the current affine transformation matrix + * @link https://php.net/manual/en/imagickdraw.affine.php + * @param array $affine

+ * Affine matrix parameters + *

+ * @return bool No value is returned. + */ + public function affine (array $affine) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a bezier curve + * @link https://php.net/manual/en/imagickdraw.bezier.php + * @param array $coordinates

+ * Multidimensional array like array( array( 'x' => 1, 'y' => 2 ), + * array( 'x' => 3, 'y' => 4 ) ) + *

+ * @return bool No value is returned. + */ + public function bezier (array $coordinates) {} + + /** + * (PECL imagick 2.0.0)
+ * Composites an image onto the current image + * @link https://php.net/manual/en/imagickdraw.composite.php + * @param int $compose

+ * composition operator. One of COMPOSITE_ constants + *

+ * @param float $x

+ * x coordinate of the top left corner + *

+ * @param float $y

+ * y coordinate of the top left corner + *

+ * @param float $width

+ * width of the composition image + *

+ * @param float $height

+ * height of the composition image + *

+ * @param Imagick $compositeWand

+ * the Imagick object where composition image is taken from + *

+ * @return bool TRUE on success. + */ + public function composite ($compose, $x, $y, $width, $height, Imagick $compositeWand) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws color on image + * @link https://php.net/manual/en/imagickdraw.color.php + * @param float $x

+ * x coordinate of the paint + *

+ * @param float $y

+ * y coordinate of the paint + *

+ * @param int $paintMethod

+ * one of the PAINT_ constants + *

+ * @return bool No value is returned. + */ + public function color ($x, $y, $paintMethod) {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a comment + * @link https://php.net/manual/en/imagickdraw.comment.php + * @param string $comment

+ * The comment string to add to vector output stream + *

+ * @return bool No value is returned. + */ + public function comment ($comment) {} + + /** + * (PECL imagick 2.0.0)
+ * Obtains the current clipping path ID + * @link https://php.net/manual/en/imagickdraw.getclippath.php + * @return string|false a string containing the clip path ID or false if no clip path exists. + */ + public function getClipPath () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the current polygon fill rule + * @link https://php.net/manual/en/imagickdraw.getcliprule.php + * @return int one of the FILLRULE_ constants. + */ + public function getClipRule () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the interpretation of clip path units + * @link https://php.net/manual/en/imagickdraw.getclipunits.php + * @return int an int on success. + */ + public function getClipUnits () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the fill color + * @link https://php.net/manual/en/imagickdraw.getfillcolor.php + * @return ImagickPixel an ImagickPixel object. + */ + public function getFillColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the opacity used when drawing + * @link https://php.net/manual/en/imagickdraw.getfillopacity.php + * @return float The opacity. + */ + public function getFillOpacity () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the fill rule + * @link https://php.net/manual/en/imagickdraw.getfillrule.php + * @return int a FILLRULE_ constant + */ + public function getFillRule () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the text placement gravity + * @link https://php.net/manual/en/imagickdraw.getgravity.php + * @return int a GRAVITY_ constant on success and 0 if no gravity is set. + */ + public function getGravity () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the current stroke antialias setting + * @link https://php.net/manual/en/imagickdraw.getstrokeantialias.php + * @return bool TRUE if antialiasing is on and false if it is off. + */ + public function getStrokeAntialias () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the color used for stroking object outlines + * @link https://php.net/manual/en/imagickdraw.getstrokecolor.php + * @return ImagickPixel an ImagickPixel object which describes the color. + */ + public function getStrokeColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns an array representing the pattern of dashes and gaps used to stroke paths + * @link https://php.net/manual/en/imagickdraw.getstrokedasharray.php + * @return array an array on success and empty array if not set. + */ + public function getStrokeDashArray () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the offset into the dash pattern to start the dash + * @link https://php.net/manual/en/imagickdraw.getstrokedashoffset.php + * @return float a float representing the offset and 0 if it's not set. + */ + public function getStrokeDashOffset () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the shape to be used at the end of open subpaths when they are stroked + * @link https://php.net/manual/en/imagickdraw.getstrokelinecap.php + * @return int one of the LINECAP_ constants or 0 if stroke linecap is not set. + */ + public function getStrokeLineCap () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the shape to be used at the corners of paths when they are stroked + * @link https://php.net/manual/en/imagickdraw.getstrokelinejoin.php + * @return int one of the LINEJOIN_ constants or 0 if stroke line join is not set. + */ + public function getStrokeLineJoin () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the stroke miter limit + * @link https://php.net/manual/en/imagickdraw.getstrokemiterlimit.php + * @return int an int describing the miter limit + * and 0 if no miter limit is set. + */ + public function getStrokeMiterLimit () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the opacity of stroked object outlines + * @link https://php.net/manual/en/imagickdraw.getstrokeopacity.php + * @return float a double describing the opacity. + */ + public function getStrokeOpacity () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the width of the stroke used to draw object outlines + * @link https://php.net/manual/en/imagickdraw.getstrokewidth.php + * @return float a double describing the stroke width. + */ + public function getStrokeWidth () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the text alignment + * @link https://php.net/manual/en/imagickdraw.gettextalignment.php + * @return int one of the ALIGN_ constants and 0 if no align is set. + */ + public function getTextAlignment () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the current text antialias setting + * @link https://php.net/manual/en/imagickdraw.gettextantialias.php + * @return bool TRUE if text is antialiased and false if not. + */ + public function getTextAntialias () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a string containing vector graphics + * @link https://php.net/manual/en/imagickdraw.getvectorgraphics.php + * @return string a string containing the vector graphics. + */ + public function getVectorGraphics () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the text under color + * @link https://php.net/manual/en/imagickdraw.gettextundercolor.php + * @return ImagickPixel an ImagickPixel object describing the color. + */ + public function getTextUnderColor () {} + + /** + * (PECL imagick 2.0.0)
+ * Adds a path element to the current path + * @link https://php.net/manual/en/imagickdraw.pathclose.php + * @return bool No value is returned. + */ + public function pathClose () {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a cubic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetoabsolute.php + * @param float $x1

+ * x coordinate of the first control point + *

+ * @param float $y1

+ * y coordinate of the first control point + *

+ * @param float $x2

+ * x coordinate of the second control point + *

+ * @param float $y2

+ * y coordinate of the first control point + *

+ * @param float $x

+ * x coordinate of the curve end + *

+ * @param float $y

+ * y coordinate of the curve end + *

+ * @return bool No value is returned. + */ + public function pathCurveToAbsolute ($x1, $y1, $x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a cubic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetorelative.php + * @param float $x1

+ * x coordinate of starting control point + *

+ * @param float $y1

+ * y coordinate of starting control point + *

+ * @param float $x2

+ * x coordinate of ending control point + *

+ * @param float $y2

+ * y coordinate of ending control point + *

+ * @param float $x

+ * ending x coordinate + *

+ * @param float $y

+ * ending y coordinate + *

+ * @return bool No value is returned. + */ + public function pathCurveToRelative ($x1, $y1, $x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a quadratic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierabsolute.php + * @param float $x1

+ * x coordinate of the control point + *

+ * @param float $y1

+ * y coordinate of the control point + *

+ * @param float $x

+ * x coordinate of the end point + *

+ * @param float $y

+ * y coordinate of the end point + *

+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierAbsolute ($x1, $y1, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a quadratic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierrelative.php + * @param float $x1

+ * starting x coordinate + *

+ * @param float $y1

+ * starting y coordinate + *

+ * @param float $x

+ * ending x coordinate + *

+ * @param float $y

+ * ending y coordinate + *

+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierRelative ($x1, $y1, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a quadratic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothabsolute.php + * @param float $x

+ * ending x coordinate + *

+ * @param float $y

+ * ending y coordinate + *

+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierSmoothAbsolute ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a quadratic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothrelative.php + * @param float $x

+ * ending x coordinate + *

+ * @param float $y

+ * ending y coordinate + *

+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierSmoothRelative ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a cubic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothabsolute.php + * @param float $x2

+ * x coordinate of the second control point + *

+ * @param float $y2

+ * y coordinate of the second control point + *

+ * @param float $x

+ * x coordinate of the ending point + *

+ * @param float $y

+ * y coordinate of the ending point + *

+ * @return bool No value is returned. + */ + public function pathCurveToSmoothAbsolute ($x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a cubic Bezier curve + * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothrelative.php + * @param float $x2

+ * x coordinate of the second control point + *

+ * @param float $y2

+ * y coordinate of the second control point + *

+ * @param float $x

+ * x coordinate of the ending point + *

+ * @param float $y

+ * y coordinate of the ending point + *

+ * @return bool No value is returned. + */ + public function pathCurveToSmoothRelative ($x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws an elliptical arc + * @link https://php.net/manual/en/imagickdraw.pathellipticarcabsolute.php + * @param float $rx

+ * x radius + *

+ * @param float $ry

+ * y radius + *

+ * @param float $x_axis_rotation

+ * x axis rotation + *

+ * @param bool $large_arc_flag

+ * large arc flag + *

+ * @param bool $sweep_flag

+ * sweep flag + *

+ * @param float $x

+ * x coordinate + *

+ * @param float $y

+ * y coordinate + *

+ * @return bool No value is returned. + */ + public function pathEllipticArcAbsolute ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws an elliptical arc + * @link https://php.net/manual/en/imagickdraw.pathellipticarcrelative.php + * @param float $rx

+ * x radius + *

+ * @param float $ry

+ * y radius + *

+ * @param float $x_axis_rotation

+ * x axis rotation + *

+ * @param bool $large_arc_flag

+ * large arc flag + *

+ * @param bool $sweep_flag

+ * sweep flag + *

+ * @param float $x

+ * x coordinate + *

+ * @param float $y

+ * y coordinate + *

+ * @return bool No value is returned. + */ + public function pathEllipticArcRelative ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Terminates the current path + * @link https://php.net/manual/en/imagickdraw.pathfinish.php + * @return bool No value is returned. + */ + public function pathFinish () {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a line path + * @link https://php.net/manual/en/imagickdraw.pathlinetoabsolute.php + * @param float $x

+ * starting x coordinate + *

+ * @param float $y

+ * ending x coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToAbsolute ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a line path + * @link https://php.net/manual/en/imagickdraw.pathlinetorelative.php + * @param float $x

+ * starting x coordinate + *

+ * @param float $y

+ * starting y coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToRelative ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a horizontal line path + * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalabsolute.php + * @param float $x

+ * x coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToHorizontalAbsolute ($x) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a horizontal line + * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalrelative.php + * @param float $x

+ * x coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToHorizontalRelative ($x) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a vertical line + * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalabsolute.php + * @param float $y

+ * y coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToVerticalAbsolute ($y) {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a vertical line path + * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalrelative.php + * @param float $y

+ * y coordinate + *

+ * @return bool No value is returned. + */ + public function pathLineToVerticalRelative ($y) {} + + /** + * (PECL imagick 2.0.0)
+ * Starts a new sub-path + * @link https://php.net/manual/en/imagickdraw.pathmovetoabsolute.php + * @param float $x

+ * x coordinate of the starting point + *

+ * @param float $y

+ * y coordinate of the starting point + *

+ * @return bool No value is returned. + */ + public function pathMoveToAbsolute ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Starts a new sub-path + * @link https://php.net/manual/en/imagickdraw.pathmovetorelative.php + * @param float $x

+ * target x coordinate + *

+ * @param float $y

+ * target y coordinate + *

+ * @return bool No value is returned. + */ + public function pathMoveToRelative ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Declares the start of a path drawing list + * @link https://php.net/manual/en/imagickdraw.pathstart.php + * @return bool No value is returned. + */ + public function pathStart () {} + + /** + * (PECL imagick 2.0.0)
+ * Draws a polyline + * @link https://php.net/manual/en/imagickdraw.polyline.php + * @param array $coordinates

+ * array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) ) + *

+ * @return bool TRUE on success. + */ + public function polyline (array $coordinates) {} + + /** + * (PECL imagick 2.0.0)
+ * Terminates a clip path definition + * @link https://php.net/manual/en/imagickdraw.popclippath.php + * @return bool No value is returned. + */ + public function popClipPath () {} + + /** + * (PECL imagick 2.0.0)
+ * Terminates a definition list + * @link https://php.net/manual/en/imagickdraw.popdefs.php + * @return bool No value is returned. + */ + public function popDefs () {} + + /** + * (PECL imagick 2.0.0)
+ * Terminates a pattern definition + * @link https://php.net/manual/en/imagickdraw.poppattern.php + * @return bool TRUE on success or FALSE on failure. + */ + public function popPattern () {} + + /** + * (PECL imagick 2.0.0)
+ * Starts a clip path definition + * @link https://php.net/manual/en/imagickdraw.pushclippath.php + * @param string $clip_mask_id

+ * Clip mask Id + *

+ * @return bool No value is returned. + */ + public function pushClipPath ($clip_mask_id) {} + + /** + * (PECL imagick 2.0.0)
+ * Indicates that following commands create named elements for early processing + * @link https://php.net/manual/en/imagickdraw.pushdefs.php + * @return bool No value is returned. + */ + public function pushDefs () {} + + /** + * (PECL imagick 2.0.0)
+ * Indicates that subsequent commands up to a ImagickDraw::opPattern() command comprise the definition of a named pattern + * @link https://php.net/manual/en/imagickdraw.pushpattern.php + * @param string $pattern_id

+ * the pattern Id + *

+ * @param float $x

+ * x coordinate of the top-left corner + *

+ * @param float $y

+ * y coordinate of the top-left corner + *

+ * @param float $width

+ * width of the pattern + *

+ * @param float $height

+ * height of the pattern + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function pushPattern ($pattern_id, $x, $y, $width, $height) {} + + /** + * (PECL imagick 2.0.0)
+ * Renders all preceding drawing commands onto the image + * @link https://php.net/manual/en/imagickdraw.render.php + * @return bool TRUE on success or FALSE on failure. + */ + public function render () {} + + /** + * (PECL imagick 2.0.0)
+ * Applies the specified rotation to the current coordinate space + * @link https://php.net/manual/en/imagickdraw.rotate.php + * @param float $degrees

+ * degrees to rotate + *

+ * @return bool No value is returned. + */ + public function rotate ($degrees) {} + + /** + * (PECL imagick 2.0.0)
+ * Adjusts the scaling factor + * @link https://php.net/manual/en/imagickdraw.scale.php + * @param float $x

+ * horizontal factor + *

+ * @param float $y

+ * vertical factor + *

+ * @return bool No value is returned. + */ + public function scale ($x, $y) {} + + /** + * (PECL imagick 2.0.0)
+ * Associates a named clipping path with the image + * @link https://php.net/manual/en/imagickdraw.setclippath.php + * @param string $clip_mask

+ * the clipping path name + *

+ * @return bool No value is returned. + */ + public function setClipPath ($clip_mask) {} + + /** + * (PECL imagick 2.0.0)
+ * Set the polygon fill rule to be used by the clipping path + * @link https://php.net/manual/en/imagickdraw.setcliprule.php + * @param int $fill_rule

+ * FILLRULE_ constant + *

+ * @return bool No value is returned. + */ + public function setClipRule ($fill_rule) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the interpretation of clip path units + * @link https://php.net/manual/en/imagickdraw.setclipunits.php + * @param int $clip_units

+ * the number of clip units + *

+ * @return bool No value is returned. + */ + public function setClipUnits ($clip_units) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the opacity to use when drawing using the fill color or fill texture + * @link https://php.net/manual/en/imagickdraw.setfillopacity.php + * @param float $fillOpacity

+ * the fill opacity + *

+ * @return bool No value is returned. + */ + public function setFillOpacity ($fillOpacity) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the URL to use as a fill pattern for filling objects + * @link https://php.net/manual/en/imagickdraw.setfillpatternurl.php + * @param string $fill_url

+ * URL to use to obtain fill pattern. + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function setFillPatternURL ($fill_url) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the fill rule to use while drawing polygons + * @link https://php.net/manual/en/imagickdraw.setfillrule.php + * @param int $fill_rule

+ * FILLRULE_ constant + *

+ * @return bool No value is returned. + */ + public function setFillRule ($fill_rule) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the text placement gravity + * @link https://php.net/manual/en/imagickdraw.setgravity.php + * @param int $gravity

+ * GRAVITY_ constant + *

+ * @return bool No value is returned. + */ + public function setGravity ($gravity) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the pattern used for stroking object outlines + * @link https://php.net/manual/en/imagickdraw.setstrokepatternurl.php + * @param string $stroke_url

+ * stroke URL + *

+ * @return bool imagick.imagickdraw.return.success; + */ + public function setStrokePatternURL ($stroke_url) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the offset into the dash pattern to start the dash + * @link https://php.net/manual/en/imagickdraw.setstrokedashoffset.php + * @param float $dash_offset

+ * dash offset + *

+ * @return bool No value is returned. + */ + public function setStrokeDashOffset ($dash_offset) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the shape to be used at the end of open subpaths when they are stroked + * @link https://php.net/manual/en/imagickdraw.setstrokelinecap.php + * @param int $linecap

+ * LINECAP_ constant + *

+ * @return bool No value is returned. + */ + public function setStrokeLineCap ($linecap) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the shape to be used at the corners of paths when they are stroked + * @link https://php.net/manual/en/imagickdraw.setstrokelinejoin.php + * @param int $linejoin

+ * LINEJOIN_ constant + *

+ * @return bool No value is returned. + */ + public function setStrokeLineJoin ($linejoin) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the miter limit + * @link https://php.net/manual/en/imagickdraw.setstrokemiterlimit.php + * @param int $miterlimit

+ * the miter limit + *

+ * @return bool No value is returned. + */ + public function setStrokeMiterLimit ($miterlimit) {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the opacity of stroked object outlines + * @link https://php.net/manual/en/imagickdraw.setstrokeopacity.php + * @param float $stroke_opacity

+ * stroke opacity. 1.0 is fully opaque + *

+ * @return bool No value is returned. + */ + public function setStrokeOpacity ($stroke_opacity) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the vector graphics + * @link https://php.net/manual/en/imagickdraw.setvectorgraphics.php + * @param string $xml

+ * xml containing the vector graphics + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function setVectorGraphics ($xml) {} + + /** + * (PECL imagick 2.0.0)
+ * Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw + * @link https://php.net/manual/en/imagickdraw.pop.php + * @return bool TRUE on success and false on failure. + */ + public function pop () {} + + /** + * (PECL imagick 2.0.0)
+ * Clones the current ImagickDraw and pushes it to the stack + * @link https://php.net/manual/en/imagickdraw.push.php + * @return bool TRUE on success or FALSE on failure. + */ + public function push () {} + + /** + * (PECL imagick 2.0.0)
+ * Specifies the pattern of dashes and gaps used to stroke paths + * @link https://php.net/manual/en/imagickdraw.setstrokedasharray.php + * @param array $dashArray

+ * array of floats + *

+ * @return bool TRUE on success. + */ + public function setStrokeDashArray (array $dashArray) {} + + /** + * Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0. + * + * @param float $opacity + * @return void + * @since 3.4.1 + */ + public function setOpacity($opacity) { } + + /** + * Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0. + * + * @return float + * @since 3.4.1 + */ + public function getOpacity() { } + + /** + * Sets the image font resolution. + * + * @param float $x + * @param float $y + * @return bool + * @since 3.4.1 + */ + public function setFontResolution($x, $y) { } + + /** + * Gets the image X and Y resolution. + * + * @return array + * @since 3.4.1 + */ + public function getFontResolution() { } + + /** + * Returns the direction that will be used when annotating with text. + * @return bool + * @since 3.4.1 + */ + public function getTextDirection() { } + + /** + * Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. + * + * @param int $direction + * @return bool + * @since 3.4.1 + */ + public function setTextDirection($direction) { } + + /** + * Returns the border color used for drawing bordered objects. + * + * @return ImagickPixel + * @since 3.4.1 + */ + public function getBorderColor() { } + + /** + * Sets the border color to be used for drawing bordered objects. + * @param ImagickPixel $color + * @return bool + * @since 3.4.1 + */ + public function setBorderColor(ImagickPixel $color) { } + + /** + * Obtains the vertical and horizontal resolution. + * + * @return string|null + * @since 3.4.1 + */ + public function getDensity() { } + + /** + * Sets the vertical and horizontal resolution. + * @param string $density_string + * @return bool + * @since 3.4.1 + */ + public function setDensity($density_string) { } +} + +/** + * @link https://php.net/manual/en/class.imagickpixeliterator.php + */ +class ImagickPixelIterator implements Iterator { + + /** + * (PECL imagick 2.0.0)
+ * The ImagickPixelIterator constructor + * @link https://php.net/manual/en/imagickpixeliterator.construct.php + * @param Imagick $wand + */ + public function __construct (Imagick $wand) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a new pixel iterator + * @link https://php.net/manual/en/imagickpixeliterator.newpixeliterator.php + * @param Imagick $wand + * @return bool TRUE on success. Throwing ImagickPixelIteratorException. + * @throws ImagickPixelIteratorException + */ + public function newPixelIterator (Imagick $wand) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns a new pixel iterator + * @link https://php.net/manual/en/imagickpixeliterator.newpixelregioniterator.php + * @param Imagick $wand + * @param int $x + * @param int $y + * @param int $columns + * @param int $rows + * @return bool a new ImagickPixelIterator on success; on failure, throws ImagickPixelIteratorException + * @throws ImagickPixelIteratorException + */ + public function newPixelRegionIterator (Imagick $wand, $x, $y, $columns, $rows) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the current pixel iterator row + * @link https://php.net/manual/en/imagickpixeliterator.getiteratorrow.php + * @return int the integer offset of the row, throwing ImagickPixelIteratorException on error. + * @throws ImagickPixelIteratorException on error + */ + public function getIteratorRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Set the pixel iterator row + * @link https://php.net/manual/en/imagickpixeliterator.setiteratorrow.php + * @param int $row + * @return bool TRUE on success. + */ + public function setIteratorRow ($row) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the pixel iterator to the first pixel row + * @link https://php.net/manual/en/imagickpixeliterator.setiteratorfirstrow.php + * @return bool TRUE on success. + */ + public function setIteratorFirstRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the pixel iterator to the last pixel row + * @link https://php.net/manual/en/imagickpixeliterator.setiteratorlastrow.php + * @return bool TRUE on success. + */ + public function setIteratorLastRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the previous row + * @link https://php.net/manual/en/imagickpixeliterator.getpreviousiteratorrow.php + * @return array the previous row as an array of ImagickPixelWand objects from the + * ImagickPixelIterator, throwing ImagickPixelIteratorException on error. + * @throws ImagickPixelIteratorException on error + */ + public function getPreviousIteratorRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the current row of ImagickPixel objects + * @link https://php.net/manual/en/imagickpixeliterator.getcurrentiteratorrow.php + * @return array a row as an array of ImagickPixel objects that can themselves be iterated. + */ + public function getCurrentIteratorRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the next row of the pixel iterator + * @link https://php.net/manual/en/imagickpixeliterator.getnextiteratorrow.php + * @return array the next row as an array of ImagickPixel objects, throwing + * ImagickPixelIteratorException on error. + * @throws ImagickPixelIteratorException on error + */ + public function getNextIteratorRow () {} + + /** + * (PECL imagick 2.0.0)
+ * Resets the pixel iterator + * @link https://php.net/manual/en/imagickpixeliterator.resetiterator.php + * @return bool TRUE on success. + */ + public function resetIterator () {} + + /** + * (PECL imagick 2.0.0)
+ * Syncs the pixel iterator + * @link https://php.net/manual/en/imagickpixeliterator.synciterator.php + * @return bool TRUE on success. + */ + public function syncIterator () {} + + /** + * (PECL imagick 2.0.0)
+ * Deallocates resources associated with a PixelIterator + * @link https://php.net/manual/en/imagickpixeliterator.destroy.php + * @return bool TRUE on success. + */ + public function destroy () {} + + /** + * (PECL imagick 2.0.0)
+ * Clear resources associated with a PixelIterator + * @link https://php.net/manual/en/imagickpixeliterator.clear.php + * @return bool TRUE on success. + */ + public function clear () {} + + /** + * @param Imagick $Imagick + */ + public static function getpixeliterator (Imagick $Imagick) {} + + /** + * @param Imagick $Imagick + * @param $x + * @param $y + * @param $columns + * @param $rows + */ + public static function getpixelregioniterator (Imagick $Imagick, $x, $y, $columns, $rows) {} + + public function key () {} + + public function next () {} + + public function rewind () {} + + public function current () {} + + public function valid () {} + +} + +/** + * @method clone() + * @link https://php.net/manual/en/class.imagickpixel.php + */ +class ImagickPixel { + + /** + * (PECL imagick 2.0.0)
+ * Returns the normalized HSL color of the ImagickPixel object + * @link https://php.net/manual/en/imagickpixel.gethsl.php + * @return array the HSL value in an array with the keys "hue", + * "saturation", and "luminosity". Throws ImagickPixelException on failure. + * @throws ImagickPixelException on failure + */ + public function getHSL () {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the normalized HSL color + * @link https://php.net/manual/en/imagickpixel.sethsl.php + * @param float $hue

+ * The normalized value for hue, described as a fractional arc + * (between 0 and 1) of the hue circle, where the zero value is + * red. + *

+ * @param float $saturation

+ * The normalized value for saturation, with 1 as full saturation. + *

+ * @param float $luminosity

+ * The normalized value for luminosity, on a scale from black at + * 0 to white at 1, with the full HS value at 0.5 luminosity. + *

+ * @return bool TRUE on success. + */ + public function setHSL ($hue, $saturation, $luminosity) {} + + public function getColorValueQuantum () {} + + /** + * @param $color_value + */ + public function setColorValueQuantum ($color_value) {} + + public function getIndex () {} + + /** + * @param $index + */ + public function setIndex ($index) {} + + /** + * (PECL imagick 2.0.0)
+ * The ImagickPixel constructor + * @link https://php.net/manual/en/imagickpixel.construct.php + * @param string $color [optional]

+ * The optional color string to use as the initial value of this object. + *

+ */ + public function __construct ($color = null) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the color + * @link https://php.net/manual/en/imagickpixel.setcolor.php + * @param string $color

+ * The color definition to use in order to initialise the + * ImagickPixel object. + *

+ * @return bool TRUE if the specified color was set, FALSE otherwise. + */ + public function setColor ($color) {} + + /** + * (PECL imagick 2.0.0)
+ * Sets the normalized value of one of the channels + * @link https://php.net/manual/en/imagickpixel.setcolorvalue.php + * @param int $color

+ * One of the Imagick color constants e.g. \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA. + *

+ * @param float $value

+ * The value to set this channel to, ranging from 0 to 1. + *

+ * @return bool TRUE on success. + */ + public function setColorValue ($color, $value) {} + + /** + * (PECL imagick 2.0.0)
+ * Gets the normalized value of the provided color channel + * @link https://php.net/manual/en/imagickpixel.getcolorvalue.php + * @param int $color

+ * The color to get the value of, specified as one of the Imagick color + * constants. This can be one of the RGB colors, CMYK colors, alpha and + * opacity e.g (Imagick::COLOR_BLUE, Imagick::COLOR_MAGENTA). + *

+ * @return float The value of the channel, as a normalized floating-point number, throwing + * ImagickPixelException on error. + * @throws ImagickPixelException on error + */ + public function getColorValue ($color) {} + + /** + * (PECL imagick 2.0.0)
+ * Clears resources associated with this object + * @link https://php.net/manual/en/imagickpixel.clear.php + * @return bool TRUE on success. + */ + public function clear () {} + + /** + * (PECL imagick 2.0.0)
+ * Deallocates resources associated with this object + * @link https://php.net/manual/en/imagickpixel.destroy.php + * @return bool TRUE on success. + */ + public function destroy () {} + + /** + * (PECL imagick 2.0.0)
+ * Check the distance between this color and another + * @link https://php.net/manual/en/imagickpixel.issimilar.php + * @param ImagickPixel $color

+ * The ImagickPixel object to compare this object against. + *

+ * @param float $fuzz

+ * The maximum distance within which to consider these colors as similar. + * The theoretical maximum for this value is the square root of three + * (1.732). + *

+ * @return bool TRUE on success. + */ + public function isSimilar (ImagickPixel $color, $fuzz) {} + + /** + * (No version information available, might only be in SVN)
+ * Check the distance between this color and another + * @link https://php.net/manual/en/imagickpixel.ispixelsimilar.php + * @param ImagickPixel $color

+ * The ImagickPixel object to compare this object against. + *

+ * @param float $fuzz

+ * The maximum distance within which to consider these colors as similar. + * The theoretical maximum for this value is the square root of three + * (1.732). + *

+ * @return bool TRUE on success. + */ + public function isPixelSimilar (ImagickPixel $color, $fuzz) {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the color + * @link https://php.net/manual/en/imagickpixel.getcolor.php + * @param bool $normalized [optional]

+ * Normalize the color values + *

+ * @return array An array of channel values, each normalized if TRUE is given as param. Throws + * ImagickPixelException on error. + * @throws ImagickPixelException on error. + */ + public function getColor ($normalized = false) {} + + /** + * (PECL imagick 2.1.0)
+ * Returns the color as a string + * @link https://php.net/manual/en/imagickpixel.getcolorasstring.php + * @return string the color of the ImagickPixel object as a string. + */ + public function getColorAsString () {} + + /** + * (PECL imagick 2.0.0)
+ * Returns the color count associated with this color + * @link https://php.net/manual/en/imagickpixel.getcolorcount.php + * @return int the color count as an integer on success, throws + * ImagickPixelException on failure. + * @throws ImagickPixelException on failure. + */ + public function getColorCount () {} + + /** + * @param $colorCount + */ + public function setColorCount ($colorCount) {} + + + /** + * Returns true if the distance between two colors is less than the specified distance. The fuzz value should be in the range 0-QuantumRange.
+ * The maximum value represents the longest possible distance in the colorspace. e.g. from RGB(0, 0, 0) to RGB(255, 255, 255) for the RGB colorspace + * @link https://php.net/manual/en/imagickpixel.ispixelsimilarquantum.php + * @param string $pixel + * @param string $fuzz + * @return bool + * @since 3.3.0 + */ + public function isPixelSimilarQuantum($color, $fuzz) { } + + /** + * Returns the color of the pixel in an array as Quantum values. If ImageMagick was compiled as HDRI these will be floats, otherwise they will be integers. + * @link https://php.net/manual/en/imagickpixel.getcolorquantum.php + * @return mixed The quantum value of the color element. Float if ImageMagick was compiled with HDRI, otherwise an int. + * @since 3.3.0 + */ + public function getColorQuantum() { } + + /** + * Sets the color count associated with this color from another ImagickPixel object. + * + * @param ImagickPixel $srcPixel + * @return bool + * @since 3.4.1 + */ + public function setColorFromPixel(ImagickPixel $srcPixel) { } +} +// End of imagick v.3.2.0RC1 + +// Start of Imagick v3.3.0RC1 + +/** + * @link https://php.net/manual/en/class.imagickkernel.php + */ +class ImagickKernel { + /** + * Attach another kernel to this kernel to allow them to both be applied in a single morphology or filter function. Returns the new combined kernel. + * @link https://php.net/manual/en/imagickkernel.addkernel.php + * @param ImagickKernel $imagickKernel + * @return void + * @since 3.3.0 + */ + public function addKernel(ImagickKernel $imagickKernel) { } + + /** + * Adds a given amount of the 'Unity' Convolution Kernel to the given pre-scaled and normalized Kernel. This in effect adds that amount of the original image into the resulting convolution kernel. The resulting effect is to convert the defined kernels into blended soft-blurs, unsharp kernels or into sharpening kernels. + * @link https://php.net/manual/en/imagickkernel.addunitykernel.php + * @return void + * @since 3.3.0 + */ + public function addUnityKernel() { } + + /** + * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.
+ * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2"); + * @link https://php.net/manual/en/imagickkernel.frombuiltin.php + * @param string $kernelType The type of kernel to build e.g. \Imagick::KERNEL_DIAMOND + * @param string $kernelString A string that describes the parameters e.g. "4,2.5" + * @return void + * @since 3.3.0 + */ + public static function fromBuiltin($kernelType, $kernelString) { } + + /** + * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.
+ * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2"); + * @link https://php.net/manual/en/imagickkernel.frombuiltin.php + * @see https://www.imagemagick.org/Usage/morphology/#kernel + * @param array $matrix A matrix (i.e. 2d array) of values that define the kernel. Each element should be either a float value, or FALSE if that element shouldn't be used by the kernel. + * @param array $origin [optional] Which element of the kernel should be used as the origin pixel. e.g. For a 3x3 matrix specifying the origin as [2, 2] would specify that the bottom right element should be the origin pixel. + * @return ImagickKernel + * @since 3.3.0 + */ + public static function fromMatrix($matrix, $origin) { } + + /** + * Get the 2d matrix of values used in this kernel. The elements are either float for elements that are used or 'false' if the element should be skipped. + * @link https://php.net/manual/en/imagickkernel.getmatrix.php + * @return array A matrix (2d array) of the values that represent the kernel. + * @since 3.3.0 + */ + public function getMatrix() { } + + /** + * ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags).
+ * The exact behaviour of this function depends on the normalization type being used please see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo for details.
+ * Flag should be one of Imagick::NORMALIZE_KERNEL_VALUE, Imagick::NORMALIZE_KERNEL_CORRELATE, Imagick::NORMALIZE_KERNEL_PERCENT or not set. + * @link https://php.net/manual/en/imagickkernel.scale.php + * @see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo + * @return void + * @since 3.3.0 + */ + public function scale() { } + + /** + * Separates a linked set of kernels and returns an array of ImagickKernels. + * @link https://php.net/manual/en/imagickkernel.separate.php + * @return void + * @since 3.3.0 + */ + public function seperate() { } +} diff --git a/build/stubs/memcached.php b/build/stubs/memcached.php new file mode 100644 index 00000000000..8f898c3c5c8 --- /dev/null +++ b/build/stubs/memcached.php @@ -0,0 +1,1528 @@ +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.

+ *

Type: boolean, default: TRUE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_COMPRESSION = -1001; + const OPT_COMPRESSION_TYPE = -1004; + + /** + *

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.

+ *

Type: string, default: "".

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_PREFIX_KEY = -1002; + + /** + *

+ * Specifies the serializer to use for serializing non-scalar values. + * The valid serializers are Memcached::SERIALIZER_PHP + * or Memcached::SERIALIZER_IGBINARY. The latter is + * supported only when memcached is configured with + * --enable-memcached-igbinary option and the + * igbinary extension is loaded. + *

+ *

Type: integer, default: Memcached::SERIALIZER_PHP.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_SERIALIZER = -1003; + + /** + *

Indicates whether igbinary serializer support is available.

+ *

Type: boolean.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HAVE_IGBINARY = 0; + + /** + *

Indicates whether JSON serializer support is available.

+ *

Type: boolean.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HAVE_JSON = 0; + + /** + *

Indicates whether msgpack serializer support is available.

+ *

Type: boolean.

+ * Available as of Memcached 3.0.0. + * @since 3.0.0 + * @link https://php.net/manual/en/memcached.constants.php + */ + const HAVE_MSGPACK = 0; + + /** + *

Indicate whether set_encoding_key is available

+ *

Type: boolean.

+ * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php, https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c#L4387 + */ + const HAVE_ENCODING = 0; + + /** + * Feature support + */ + const HAVE_SESSION = 1; + const HAVE_SASL = 0; + + /** + *

Specifies the hashing algorithm used for the item keys. The valid + * values are supplied via Memcached::HASH_* constants. + * Each hash algorithm has its advantages and its disadvantages. Go with the + * default if you don't know or don't care.

+ *

Type: integer, default: Memcached::HASH_DEFAULT

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_HASH = 2; + + /** + *

The default (Jenkins one-at-a-time) item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_DEFAULT = 0; + + /** + *

MD5 item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_MD5 = 1; + + /** + *

CRC item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_CRC = 2; + + /** + *

FNV1_64 item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_FNV1_64 = 3; + + /** + *

FNV1_64A item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_FNV1A_64 = 4; + + /** + *

FNV1_32 item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_FNV1_32 = 5; + + /** + *

FNV1_32A item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_FNV1A_32 = 6; + + /** + *

Hsieh item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_HSIEH = 7; + + /** + *

Murmur item key hashing algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const HASH_MURMUR = 8; + + /** + *

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.

+ *

Type: integer, default: Memcached::DISTRIBUTION_MODULA.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_DISTRIBUTION = 9; + + /** + *

Modulo-based key distribution algorithm.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const DISTRIBUTION_MODULA = 0; + + /** + *

Consistent hashing key distribution algorithm (based on libketama).

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const DISTRIBUTION_CONSISTENT = 1; + const DISTRIBUTION_VIRTUAL_BUCKET = 6; + + /** + *

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. + *

+ *

+ * 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. + *

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_LIBKETAMA_COMPATIBLE = 16; + const OPT_LIBKETAMA_HASH = 17; + const OPT_TCP_KEEPALIVE = 32; + + /** + *

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.

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_BUFFER_WRITES = 10; + + /** + *

Enable the use of the binary protocol. Please note that you cannot + * toggle this option on an open connection.

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_BINARY_PROTOCOL = 18; + + /** + *

Enables or disables asynchronous I/O. This is the fastest transport + * available for storage functions.

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_NO_BLOCK = 0; + + /** + *

Enables or disables the no-delay feature for connecting sockets (may + * be faster in some environments).

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_TCP_NODELAY = 1; + + /** + *

The maximum socket send buffer in bytes.

+ *

Type: integer, default: varies by platform/kernel + * configuration.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_SOCKET_SEND_SIZE = 4; + + /** + *

The maximum socket receive buffer in bytes.

+ *

Type: integer, default: varies by platform/kernel + * configuration.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_SOCKET_RECV_SIZE = 5; + + /** + *

In non-blocking mode this set the value of the timeout during socket + * connection, in milliseconds.

+ *

Type: integer, default: 1000.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_CONNECT_TIMEOUT = 14; + + /** + *

The amount of time, in seconds, to wait until retrying a failed + * connection attempt.

+ *

Type: integer, default: 0.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_RETRY_TIMEOUT = 15; + + /** + *

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.

+ *

Type: integer, default: 0.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_SEND_TIMEOUT = 19; + + /** + *

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.

+ *

Type: integer, default: 0.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_RECV_TIMEOUT = 20; + + /** + *

Timeout for connection polling, in milliseconds.

+ *

Type: integer, default: 1000.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_POLL_TIMEOUT = 8; + + /** + *

Enables or disables caching of DNS lookups.

+ *

Type: boolean, default: FALSE.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const OPT_CACHE_LOOKUPS = 6; + + /** + *

Specifies the failure limit for server connection attempts. The + * server will be removed after this many continuous connection + * failures.

+ *

Type: integer, default: 0.

+ * @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; + + + /** + * libmemcached result codes + */ + /** + *

The operation was successful.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_SUCCESS = 0; + + /** + *

The operation failed in some fashion.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_FAILURE = 1; + + /** + *

DNS lookup failed.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_HOST_LOOKUP_FAILURE = 2; + + /** + *

Failed to read network data.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_UNKNOWN_READ_FAILURE = 7; + + /** + *

Bad command in memcached protocol.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_PROTOCOL_ERROR = 8; + + /** + *

Error on the client side.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_CLIENT_ERROR = 9; + + /** + *

Error on the server side.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_SERVER_ERROR = 10; + + /** + *

Failed to write network data.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_WRITE_FAILURE = 5; + + /** + *

Failed to do compare-and-swap: item you are trying to store has been + * modified since you last fetched it.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_DATA_EXISTS = 12; + + /** + *

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.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_NOTSTORED = 14; + + /** + *

Item with this key was not found (with "get" operation or "cas" + * operations).

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_NOTFOUND = 16; + + /** + *

Partial network data read error.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_PARTIAL_READ = 18; + + /** + *

Some errors occurred during multi-get.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_SOME_ERRORS = 19; + + /** + *

Server list is empty.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_NO_SERVERS = 20; + + /** + *

End of result set.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_END = 21; + + /** + *

System error.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_ERRNO = 26; + + /** + *

The operation was buffered.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_BUFFERED = 32; + + /** + *

The operation timed out.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_TIMEOUT = 31; + + /** + *

Bad key.

+ * @link https://php.net/manual/en/memcached.constants.php, http://docs.libmemcached.org/index.html + */ + /** + *

MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.

+ */ + const RES_BAD_KEY_PROVIDED = 33; + /** + *

MEMCACHED_STORED: The requested object has been successfully stored on the server.

+ */ + const RES_STORED = 15; + /** + *

MEMCACHED_DELETED: The object requested by the key has been deleted.

+ */ + const RES_DELETED = 22; + /** + *

MEMCACHED_STAT: A “stat” command has been returned in the protocol.

+ */ + const RES_STAT = 24; + /** + *

MEMCACHED_ITEM: An item has been fetched (this is an internal error only).

+ */ + const RES_ITEM = 25; + /** + *

MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.

+ */ + const RES_NOT_SUPPORTED = 28; + /** + *

MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.

+ */ + const RES_FETCH_NOTFINISHED = 30; + /** + *

MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.

+ */ + const RES_SERVER_MARKED_DEAD = 35; + /** + *

MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the protocol.

+ */ + const RES_UNKNOWN_STAT_KEY = 36; + /** + *

MEMCACHED_INVALID_HOST_PROTOCOL: The server you are connecting too has an invalid protocol. Most likely you are connecting to an older server that does not speak the binary protocol.

+ */ + const RES_INVALID_HOST_PROTOCOL = 34; + /** + *

MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.

+ */ + const RES_MEMORY_ALLOCATION_FAILURE = 17; + /** + *

MEMCACHED_E2BIG: Item is too large for the server to store.

+ */ + const RES_E2BIG = 37; + /** + *

MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.

+ */ + const RES_KEY_TOO_BIG = 39; + /** + *

MEMCACHED_SERVER_TEMPORARILY_DISABLED

+ */ + const RES_SERVER_TEMPORARILY_DISABLED = 47; + /** + *

MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory. + * + * #if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008

+ */ + const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48; + /** + *

MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.

+ */ + const RES_AUTH_PROBLEM = 40; + /** + *

MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.

+ */ + const RES_AUTH_FAILURE = 41; + /** + *

MEMCACHED_AUTH_CONTINUE: Authentication has been paused.

+ */ + const RES_AUTH_CONTINUE = 42; + /** + *

MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.

+ */ + const RES_CONNECTION_FAILURE = 3; + /** + *

MEMCACHED_CONNECTION_BIND_FAILURE: Deprecated since version <0.30(libmemcached). + * We were not able to bind() to the socket.

+ */ + const RES_CONNECTION_BIND_FAILURE = 4; + /** + *

MEMCACHED_READ_FAILURE: A read failure has occurred.

+ */ + const RES_READ_FAILURE = 6; + /** + *

MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.

+ */ + const RES_DATA_DOES_NOT_EXIST = 13; + /** + *

MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).

+ */ + const RES_VALUE = 23; + /** + *

MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.

+ */ + const RES_FAIL_UNIX_SOCKET = 27; + /** + *

MEMCACHED_NO_KEY_PROVIDED: Deprecated since version <0.30(libmemcached): Use MEMCACHED_BAD_KEY_PROVIDED instead. + * No key was provided.

+ */ + const RES_NO_KEY_PROVIDED = 29; + /** + *

MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.

+ */ + const RES_INVALID_ARGUMENTS = 38; + /** + *

MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was.

+ */ + const RES_PARSE_ERROR = 43; + /** + *

MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.

+ */ + const RES_PARSE_USER_ERROR = 44; + /** + *

MEMCACHED_DEPRECATED: The method that was requested has been deprecated.

+ */ + const RES_DEPRECATED = 45; + //unknow + const RES_IN_PROGRESS = 46; + /** + *

MEMCACHED_MAXIMUM_RETURN: This in an internal only state.

+ */ + const RES_MAXIMUM_RETURN = 49; + + /** + * Server callbacks, if compiled with --memcached-protocol + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + const ON_CONNECT = 0; + const ON_ADD = 1; + const ON_APPEND = 2; + const ON_DECREMENT = 3; + const ON_DELETE = 4; + const ON_FLUSH = 5; + const ON_GET = 6; + const ON_INCREMENT = 7; + const ON_NOOP = 8; + const ON_PREPEND = 9; + const ON_QUIT = 10; + const ON_REPLACE = 11; + const ON_SET = 12; + const ON_STAT = 13; + const ON_VERSION = 14; + /** + * Constants used when compiled with --memcached-protocol + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + const RESPONSE_SUCCESS = 0; + const RESPONSE_KEY_ENOENT = 1; + const RESPONSE_KEY_EEXISTS = 2; + const RESPONSE_E2BIG = 3; + const RESPONSE_EINVAL = 4; + const RESPONSE_NOT_STORED = 5; + const RESPONSE_DELTA_BADVAL = 6; + const RESPONSE_NOT_MY_VBUCKET = 7; + const RESPONSE_AUTH_ERROR = 32; + const RESPONSE_AUTH_CONTINUE = 33; + const RESPONSE_UNKNOWN_COMMAND = 129; + const RESPONSE_ENOMEM = 130; + const RESPONSE_NOT_SUPPORTED = 131; + const RESPONSE_EINTERNAL = 132; + const RESPONSE_EBUSY = 133; + const RESPONSE_ETMPFAIL = 134; + + + /** + *

Failed to create network socket.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11; + + /** + *

Payload failure: could not compress/decompress or serialize/unserialize the value.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const RES_PAYLOAD_FAILURE = -1001; + + /** + *

The default PHP serializer.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const SERIALIZER_PHP = 1; + + /** + *

The igbinary serializer. + * Instead of textual representation it stores PHP data structures in a + * compact binary form, resulting in space and time gains.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const SERIALIZER_IGBINARY = 2; + + /** + *

The JSON serializer. Requires PHP 5.2.10+.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const SERIALIZER_JSON = 3; + const SERIALIZER_JSON_ARRAY = 4; + /** + *

The msgpack serializer.

+ * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + const SERIALIZER_MSGPACK = 5; + + const COMPRESSION_FASTLZ = 2; + const COMPRESSION_ZLIB = 1; + + /** + *

A flag for Memcached::getMulti and + * Memcached::getMultiByKey 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.

+ * @link https://php.net/manual/en/memcached.constants.php + */ + const GET_PRESERVE_ORDER = 1; + + /** + * A flag for Memcached::get(), Memcached::getMulti() and + * Memcached::getMultiByKey() to ensure that the CAS token values are returned as well. + * @link https://php.net/manual/en/memcached.constants.php + */ + const GET_EXTENDED = 2; + + const GET_ERROR_RETURN_VALUE = false; + + /** + * (PECL memcached >= 0.1.0)
+ * Create a Memcached instance + * @link https://php.net/manual/en/memcached.construct.php, https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @param string $persistent_id [optional] + * @param callable $on_new_object_cb [optional] + * @param string $connection_str [optional] + */ + public function __construct ($persistent_id = '', $on_new_object_cb = null, $connection_str = '') {} + + /** + * (PECL memcached >= 0.1.0)
+ * 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)
+ * 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)
+ * Retrieve an item + * @link https://php.net/manual/en/memcached.get.php + * @param string $key

+ * The key of the item to retrieve. + *

+ * @param callable $cache_cb [optional]

+ * Read-through caching callback or NULL. + *

+ * @param int $flags [optional]

+ * The flags for the get operation. + *

+ * @return mixed the value stored in the cache or FALSE otherwise. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function get ($key, callable $cache_cb = null, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Retrieve an item from a specific server + * @link https://php.net/manual/en/memcached.getbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key of the item to fetch. + *

+ * @param callable $cache_cb [optional]

+ * Read-through caching callback or NULL + *

+ * @param int $flags [optional]

+ * The flags for the get operation. + *

+ * @return mixed the value stored in the cache or FALSE otherwise. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Retrieve multiple items + * @link https://php.net/manual/en/memcached.getmulti.php + * @param array $keys

+ * Array of keys to retrieve. + *

+ * @param int $flags [optional]

+ * The flags for the get operation. + *

+ * @return mixed the array of found items or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getMulti (array $keys, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Retrieve multiple items from a specific server + * @link https://php.net/manual/en/memcached.getmultibykey.php + * @param string $server_key

+ * 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. + *

+ * @param array $keys

+ * Array of keys to retrieve. + *

+ * @param int $flags [optional]

+ * The flags for the get operation. + *

+ * @return array|false the array of found items or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getMultiByKey ($server_key, array $keys, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Request multiple items + * @link https://php.net/manual/en/memcached.getdelayed.php + * @param array $keys

+ * Array of keys to request. + *

+ * @param bool $with_cas [optional]

+ * Whether to request CAS token values also. + *

+ * @param callable $value_cb [optional]

+ * The result callback or NULL. + *

+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Request multiple items from a specific server + * @link https://php.net/manual/en/memcached.getdelayedbykey.php + * @param string $server_key

+ * 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. + *

+ * @param array $keys

+ * Array of keys to request. + *

+ * @param bool $with_cas [optional]

+ * Whether to request CAS token values also. + *

+ * @param callable $value_cb [optional]

+ * The result callback or NULL. + *

+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Fetch the next result + * @link https://php.net/manual/en/memcached.fetch.php + * @return array|false the next result or FALSE otherwise. + * The Memcached::getResultCode will return + * Memcached::RES_END if result set is exhausted. + */ + public function fetch () {} + + /** + * (PECL memcached >= 0.1.0)
+ * Fetch all the remaining results + * @link https://php.net/manual/en/memcached.fetchall.php + * @return array|false the results or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function fetchAll () {} + + /** + * (PECL memcached >= 0.1.0)
+ * Store an item + * @link https://php.net/manual/en/memcached.set.php + * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function set ($key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Store an item on a specific server + * @link https://php.net/manual/en/memcached.setbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Set a new expiration on an item + * @link https://php.net/manual/en/memcached.touch.php + * @param string $key

+ * The key under which to store the value. + *

+ * @param int $expiration

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function touch ($key, $expiration = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Set a new expiration on an item on a specific server + * @link https://php.net/manual/en/memcached.touchbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param int $expiration

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function touchByKey ($server_key, $key, $expiration) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Store multiple items + * @link https://php.net/manual/en/memcached.setmulti.php + * @param array $items

+ * An array of key/value pairs to store on the server. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setMulti (array $items, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Store multiple items on a specific server + * @link https://php.net/manual/en/memcached.setmultibykey.php + * @param string $server_key

+ * 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. + *

+ * @param array $items

+ * An array of key/value pairs to store on the server. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Compare and swap an item + * @link https://php.net/manual/en/memcached.cas.php + * @param float $cas_token

+ * Unique value associated with the existing item. Generated by memcache. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_DATA_EXISTS 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)
+ * Compare and swap an item on a specific server + * @link https://php.net/manual/en/memcached.casbykey.php + * @param float $cas_token

+ * Unique value associated with the existing item. Generated by memcache. + *

+ * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_DATA_EXISTS 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)
+ * Add an item under a new key + * @link https://php.net/manual/en/memcached.add.php + * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key already exists. + */ + public function add ($key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Add an item under a new key on a specific server + * @link https://php.net/manual/en/memcached.addbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key already exists. + */ + public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Append data to an existing item + * @link https://php.net/manual/en/memcached.append.php + * @param string $key

+ * The key under which to store the value. + *

+ * @param string $value

+ * The string to append. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function append ($key, $value) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Append data to an existing item on a specific server + * @link https://php.net/manual/en/memcached.appendbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param string $value

+ * The string to append. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function appendByKey ($server_key, $key, $value) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Prepend data to an existing item + * @link https://php.net/manual/en/memcached.prepend.php + * @param string $key

+ * The key of the item to prepend the data to. + *

+ * @param string $value

+ * The string to prepend. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function prepend ($key, $value) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Prepend data to an existing item on a specific server + * @link https://php.net/manual/en/memcached.prependbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key of the item to prepend the data to. + *

+ * @param string $value

+ * The string to prepend. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function prependByKey ($server_key, $key, $value) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Replace the item under an existing key + * @link https://php.net/manual/en/memcached.replace.php + * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function replace ($key, $value, $expiration = null, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Replace the item under an existing key on a specific server + * @link https://php.net/manual/en/memcached.replacebykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key under which to store the value. + *

+ * @param mixed $value

+ * The value to store. + *

+ * @param int $expiration [optional]

+ * The expiration time, defaults to 0. See Expiration Times for more info. + *

+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Delete an item + * @link https://php.net/manual/en/memcached.delete.php + * @param string $key

+ * The key to be deleted. + *

+ * @param int $time [optional]

+ * The amount of time the server will wait to delete the item. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function delete ($key, $time = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Delete multiple items + * @link https://php.net/manual/en/memcached.deletemulti.php + * @param array $keys

+ * The keys to be deleted. + *

+ * @param int $time [optional]

+ * The amount of time the server will wait to delete the items. + *

+ * @return array Returns array indexed by keys and where values are indicating whether operation succeeded or not. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteMulti (array $keys, $time = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Delete an item from a specific server + * @link https://php.net/manual/en/memcached.deletebykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key to be deleted. + *

+ * @param int $time [optional]

+ * The amount of time the server will wait to delete the item. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteByKey ($server_key, $key, $time = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Delete multiple items from a specific server + * @link https://php.net/manual/en/memcached.deletemultibykey.php + * @param string $server_key

+ * 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. + *

+ * @param array $keys

+ * The keys to be deleted. + *

+ * @param int $time [optional]

+ * The amount of time the server will wait to delete the items. + *

+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteMultiByKey ($server_key, array $keys, $time = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Increment numeric item's value + * @link https://php.net/manual/en/memcached.increment.php + * @param string $key

+ * The key of the item to increment. + *

+ * @param int $offset [optional]

+ * The amount by which to increment the item's value. + *

+ * @param int $initial_value [optional]

+ * The value to set the item to if it doesn't currently exist. + *

+ * @param int $expiry [optional]

+ * The expiry time to set on the item. + *

+ * @return int|false new item's value on success or FALSE on failure. + */ + public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Decrement numeric item's value + * @link https://php.net/manual/en/memcached.decrement.php + * @param string $key

+ * The key of the item to decrement. + *

+ * @param int $offset [optional]

+ * The amount by which to decrement the item's value. + *

+ * @param int $initial_value [optional]

+ * The value to set the item to if it doesn't currently exist. + *

+ * @param int $expiry [optional]

+ * The expiry time to set on the item. + *

+ * @return int|false item's new value on success or FALSE on failure. + */ + public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Increment numeric item's value, stored on a specific server + * @link https://php.net/manual/en/memcached.incrementbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key of the item to increment. + *

+ * @param int $offset [optional]

+ * The amount by which to increment the item's value. + *

+ * @param int $initial_value [optional]

+ * The value to set the item to if it doesn't currently exist. + *

+ * @param int $expiry [optional]

+ * The expiry time to set on the item. + *

+ * @return int|false new item's value on success or FALSE on failure. + */ + public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Decrement numeric item's value, stored on a specific server + * @link https://php.net/manual/en/memcached.decrementbykey.php + * @param string $server_key

+ * 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. + *

+ * @param string $key

+ * The key of the item to decrement. + *

+ * @param int $offset [optional]

+ * The amount by which to decrement the item's value. + *

+ * @param int $initial_value [optional]

+ * The value to set the item to if it doesn't currently exist. + *

+ * @param int $expiry [optional]

+ * The expiry time to set on the item. + *

+ * @return int|false item's new value on success or FALSE on failure. + */ + public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Add a server to the server pool + * @link https://php.net/manual/en/memcached.addserver.php + * @param string $host

+ * The hostname of the memcache server. If the hostname is invalid, data-related + * operations will set + * Memcached::RES_HOST_LOOKUP_FAILURE result code. + *

+ * @param int $port

+ * The port on which memcache is running. Usually, this is + * 11211. + *

+ * @param int $weight [optional]

+ * 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. + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function addServer ($host, $port, $weight = 0) {} + + /** + * (PECL memcached >= 0.1.1)
+ * Add multiple servers to the server pool + * @link https://php.net/manual/en/memcached.addservers.php + * @param array $servers + * @return bool TRUE on success or FALSE on failure. + */ + public function addServers (array $servers) {} + + /** + * (PECL memcached >= 0.1.0)
+ * 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)
+ * Map a key to a server + * @link https://php.net/manual/en/memcached.getserverbykey.php + * @param string $server_key

+ * 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. + *

+ * @return array an array containing three keys of host, + * port, and weight on success or FALSE + * on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getServerByKey ($server_key) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Clears all servers from the server list + * @link https://php.net/manual/en/memcached.resetserverlist.php + * @return bool TRUE on success or FALSE on failure. + */ + public function resetServerList () {} + + /** + * (PECL memcached >= 2.0.0)
+ * Close any open connections + * @link https://php.net/manual/en/memcached.quit.php + * @return bool TRUE on success or FALSE on failure. + */ + public function quit () {} + + /** + * (PECL memcached >= 0.1.0)
+ * Get server pool statistics + * @link https://php.net/manual/en/memcached.getstats.php + * @param string $type

items, slabs, sizes ...

+ * @return array Array of server statistics, one entry per server. + */ + public function getStats ($type = null) {} + + /** + * (PECL memcached >= 0.1.5)
+ * 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)
+ * Gets the keys stored on all the servers + * @link https://php.net/manual/en/memcached.getallkeys.php + * @return array|false the keys stored on all the servers on success or FALSE on failure. + */ + public function getAllKeys () {} + + /** + * (PECL memcached >= 0.1.0)
+ * Invalidate all items in the cache + * @link https://php.net/manual/en/memcached.flush.php + * @param int $delay [optional]

+ * Numer of seconds to wait before invalidating the items. + *

+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function flush ($delay = 0) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Retrieve a Memcached option value + * @link https://php.net/manual/en/memcached.getoption.php + * @param int $option

+ * One of the Memcached::OPT_* constants. + *

+ * @return mixed the value of the requested option, or FALSE on + * error. + */ + public function getOption ($option) {} + + /** + * (PECL memcached >= 0.1.0)
+ * Set a Memcached option + * @link https://php.net/manual/en/memcached.setoption.php + * @param int $option + * @param mixed $value + * @return bool TRUE on success or FALSE on failure. + */ + public function setOption ($option, $value) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Set Memcached options + * @link https://php.net/manual/en/memcached.setoptions.php + * @param array $options

+ * An associative array of options where the key is the option to set and + * the value is the new value for the option. + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function setOptions (array $options) {} + + /** + * (PECL memcached >= 2.0.0)
+ * Set the credentials to use for authentication + * @link https://secure.php.net/manual/en/memcached.setsaslauthdata.php + * @param string $username

+ * The username to use for authentication. + *

+ * @param string $password

+ * The password to use for authentication. + *

+ * @return bool TRUE on success or FALSE on failure. + */ + public function setSaslAuthData (string $username , string $password) {} + + /** + * (PECL memcached >= 2.0.0)
+ * 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)
+ * 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 () {} + + /** + * Flush and send buffered commands + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @return bool + */ + public function flushBuffers () {} + + /** + * Sets AES encryption key (libmemcached 1.0.6 and higher) + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @param string $key + * @return bool + */ + public function setEncodingKey ( $key ) {} + + /** + * Returns the last disconnected server. Was added in 0.34 according to libmemcached's Changelog + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @return array|false + */ + public function getLastDisconnectedServer () {} + + /** + * Returns the last error errno that occurred + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @return int + */ + public function getLastErrorErrno () {} + + /** + * Returns the last error code that occurred + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @return int + */ + public function getLastErrorCode () {} + + /** + * Returns the last error message that occurred + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @return string + */ + public function getLastErrorMessage () {} + + /** + * Sets the memcached virtual buckets + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c + * @param array $host_map + * @param array $forward_map + * @param int $replicas + * @return bool + */ + public function setBucket (array $host_map, array $forward_map, $replicas) {} + +} + +/** + * @link https://php.net/manual/en/class.memcachedexception.php + */ +class MemcachedException extends RuntimeException { + function __construct( $errmsg = "", $errcode = 0 ) {} +} +// End of memcached v.3.1.5 +?> diff --git a/build/stubs/redis.php b/build/stubs/redis.php new file mode 100644 index 00000000000..0a37c08214d --- /dev/null +++ b/build/stubs/redis.php @@ -0,0 +1,5262 @@ + + * @link https://github.com/ukko/phpredis-phpdoc + */ +class Redis +{ + const AFTER = 'after'; + const BEFORE = 'before'; + + /** + * Options + */ + const OPT_SERIALIZER = 1; + const OPT_PREFIX = 2; + const OPT_READ_TIMEOUT = 3; + const OPT_SCAN = 4; + const OPT_FAILOVER = 5; + const OPT_TCP_KEEPALIVE = 6; + const OPT_COMPRESSION = 7; + const OPT_REPLY_LITERAL = 8; + const OPT_COMPRESSION_LEVEL = 9; + + /** + * Cluster options + */ + const FAILOVER_NONE = 0; + const FAILOVER_ERROR = 1; + const FAILOVER_DISTRIBUTE = 2; + const FAILOVER_DISTRIBUTE_SLAVES = 3; + + /** + * SCAN options + */ + const SCAN_NORETRY = 0; + const SCAN_RETRY = 1; + + /** + * Serializers + */ + const SERIALIZER_NONE = 0; + const SERIALIZER_PHP = 1; + const SERIALIZER_IGBINARY = 2; + const SERIALIZER_MSGPACK = 3; + const SERIALIZER_JSON = 4; + + /** + * Compressions + */ + const COMPRESSION_NONE = 0; + const COMPRESSION_LZF = 1; + const COMPRESSION_ZSTD = 2; + + /** + * Compression ZSTD levels + */ + const COMPRESSION_ZSTD_MIN = 1; + const COMPRESSION_ZSTD_DEFAULT = 3; + const COMPRESSION_ZSTD_MAX = 22; + + /** + * Multi + */ + const ATOMIC = 0; + const MULTI = 1; + const PIPELINE = 2; + + /** + * Type + */ + const REDIS_NOT_FOUND = 0; + const REDIS_STRING = 1; + const REDIS_SET = 2; + const REDIS_LIST = 3; + const REDIS_ZSET = 4; + const REDIS_HASH = 5; + const REDIS_STREAM = 6; + + /** + * Creates a Redis client + * + * @example $redis = new Redis(); + */ + public function __construct() + { + } + + /** + * Connects to a Redis instance. + * + * @param string $host can be a host, or the path to a unix domain socket + * @param int $port optional + * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited) + * @param null $reserved should be null if $retryInterval is specified + * @param int $retryInterval retry interval in milliseconds. + * @param float $readTimeout value in seconds (optional, default is 0 meaning unlimited) + * + * @return bool TRUE on success, FALSE on error + * + * @example + *
+     * $redis->connect('127.0.0.1', 6379);
+     * $redis->connect('127.0.0.1');            // port 6379 by default
+     * $redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
+     * $redis->connect('/tmp/redis.sock');      // unix domain socket.
+     * 
+ */ + public function connect( + $host, + $port = 6379, + $timeout = 0.0, + $reserved = null, + $retryInterval = 0, + $readTimeout = 0.0 + ) { + } + + /** + * Connects to a Redis instance. + * + * @param string $host can be a host, or the path to a unix domain socket + * @param int $port optional + * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited) + * @param null $reserved should be null if $retry_interval is specified + * @param int $retryInterval retry interval in milliseconds. + * @param float $readTimeout value in seconds (optional, default is 0 meaning unlimited) + * + * @return bool TRUE on success, FALSE on error + * + * @see connect() + * @deprecated use Redis::connect() + */ + public function open( + $host, + $port = 6379, + $timeout = 0.0, + $reserved = null, + $retryInterval = 0, + $readTimeout = 0.0 + ) { + } + + /** + * A method to determine if a phpredis object thinks it's connected to a server + * + * @return bool Returns TRUE if phpredis thinks it's connected and FALSE if not + */ + public function isConnected() + { + } + + /** + * Retrieve our host or unix socket that we're connected to + * + * @return string|bool The host or unix socket we're connected to or FALSE if we're not connected + */ + public function getHost() + { + } + + /** + * Get the port we're connected to + * + * @return int|bool Returns the port we're connected to or FALSE if we're not connected + */ + public function getPort() + { + } + + /** + * Get the database number phpredis is pointed to + * + * @return int|bool Returns the database number (int) phpredis thinks it's pointing to + * or FALSE if we're not connected + */ + public function getDbNum() + { + } + + /** + * Get the (write) timeout in use for phpredis + * + * @return float|bool The timeout (DOUBLE) specified in our connect call or FALSE if we're not connected + */ + public function getTimeout() + { + } + + /** + * Get the read timeout specified to phpredis or FALSE if we're not connected + * + * @return float|bool Returns the read timeout (which can be set using setOption and Redis::OPT_READ_TIMEOUT) + * or FALSE if we're not connected + */ + public function getReadTimeout() + { + } + + /** + * Gets the persistent ID that phpredis is using + * + * @return string|null|bool Returns the persistent id phpredis is using + * (which will only be set if connected with pconnect), + * NULL if we're not using a persistent ID, + * and FALSE if we're not connected + */ + public function getPersistentID() + { + } + + /** + * Get the password used to authenticate the phpredis connection + * + * @return string|null|bool Returns the password used to authenticate a phpredis session or NULL if none was used, + * and FALSE if we're not connected + */ + public function getAuth() + { + } + + /** + * Connects to a Redis instance or reuse a connection already established with pconnect/popen. + * + * The connection will not be closed on close or end of request until the php process ends. + * So be patient on to many open FD's (specially on redis server side) when using persistent connections on + * many servers connecting to one redis server. + * + * Also more than one persistent connection can be made identified by either host + port + timeout + * or host + persistentId or unix socket + timeout. + * + * This feature is not available in threaded versions. pconnect and popen then working like their non persistent + * equivalents. + * + * @param string $host can be a host, or the path to a unix domain socket + * @param int $port optional + * @param float $timeout value in seconds (optional, default is 0 meaning unlimited) + * @param string $persistentId identity for the requested persistent connection + * @param int $retryInterval retry interval in milliseconds. + * @param float $readTimeout value in seconds (optional, default is 0 meaning unlimited) + * + * @return bool TRUE on success, FALSE on ertcnror. + * + * @example + *
+     * $redis->pconnect('127.0.0.1', 6379);
+     *
+     * // port 6379 by default - same connection like before
+     * $redis->pconnect('127.0.0.1');
+     *
+     * // 2.5 sec timeout and would be another connection than the two before.
+     * $redis->pconnect('127.0.0.1', 6379, 2.5);
+     *
+     * // x is sent as persistent_id and would be another connection than the three before.
+     * $redis->pconnect('127.0.0.1', 6379, 2.5, 'x');
+     *
+     * // unix domain socket - would be another connection than the four before.
+     * $redis->pconnect('/tmp/redis.sock');
+     * 
+ */ + public function pconnect( + $host, + $port = 6379, + $timeout = 0.0, + $persistentId = null, + $retryInterval = 0, + $readTimeout = 0.0 + ) { + } + + /** + * @param string $host + * @param int $port + * @param float $timeout + * @param string $persistentId + * @param int $retryInterval + * @param float $readTimeout + * + * @return bool + * + * @deprecated use Redis::pconnect() + * @see pconnect() + */ + public function popen( + $host, + $port = 6379, + $timeout = 0.0, + $persistentId = '', + $retryInterval = 0, + $readTimeout = 0.0 + ) { + } + + /** + * Disconnects from the Redis instance. + * + * Note: Closing a persistent connection requires PhpRedis >= 4.2.0 + * + * @since >= 4.2 Closing a persistent connection requires PhpRedis + * + * @return bool TRUE on success, FALSE on error + */ + public function close() + { + } + + /** + * Swap one Redis database with another atomically + * + * Note: Requires Redis >= 4.0.0 + * + * @param int $db1 + * @param int $db2 + * + * @return bool TRUE on success and FALSE on failure + * + * @link https://redis.io/commands/swapdb + * @since >= 4.0 + * @example + *
+     * // Swaps DB 0 with DB 1 atomically
+     * $redis->swapdb(0, 1);
+     * 
+ */ + public function swapdb(int $db1, int $db2) + { + } + + /** + * Set client option + * + * @param int $option option name + * @param mixed $value option value + * + * @return bool TRUE on success, FALSE on error + * + * @example + *
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);        // don't serialize data
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);         // use built-in serialize/unserialize
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);    // use igBinary serialize/unserialize
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_MSGPACK);     // Use msgpack serialize/unserialize
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_JSON);        // Use json serialize/unserialize
+     *
+     * $redis->setOption(Redis::OPT_PREFIX, 'myAppName:');                      // use custom prefix on all keys
+     *
+     * // Options for the SCAN family of commands, indicating whether to abstract
+     * // empty results from the user.  If set to SCAN_NORETRY (the default), phpredis
+     * // will just issue one SCAN command at a time, sometimes returning an empty
+     * // array of results.  If set to SCAN_RETRY, phpredis will retry the scan command
+     * // until keys come back OR Redis returns an iterator of zero
+     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);
+     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);
+     * 
+ */ + public function setOption($option, $value) + { + } + + /** + * Get client option + * + * @param int $option parameter name + * + * @return mixed|null Parameter value + * + * @see setOption() + * @example + * // return option value + * $redis->getOption(Redis::OPT_SERIALIZER); + */ + public function getOption($option) + { + } + + /** + * Check the current connection status + * + * @param string $message + * + * @return bool|string TRUE if the command is successful or returns message + * Throws a RedisException object on connectivity error, as described above. + * @throws RedisException + * @link https://redis.io/commands/ping + */ + public function ping($message) + { + } + + /** + * Echo the given string + * + * @param string $message + * + * @return string Returns message + * + * @link https://redis.io/commands/echo + */ + public function echo($message) + { + } + + /** + * Get the value related to the specified key + * + * @param string $key + * + * @return string|mixed|bool If key didn't exist, FALSE is returned. + * Otherwise, the value related to this key is returned + * + * @link https://redis.io/commands/get + * @example + *
+     * $redis->set('key', 'hello');
+     * $redis->get('key');
+     *
+     * // set and get with serializer
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_JSON);
+     *
+     * $redis->set('key', ['asd' => 'as', 'dd' => 123, 'b' => true]);
+     * var_dump($redis->get('key'));
+     * // Output:
+     * array(3) {
+     *  'asd' => string(2) "as"
+     *  'dd' => int(123)
+     *  'b' => bool(true)
+     * }
+     * 
+ */ + public function get($key) + { + } + + /** + * Set the string value in argument as value of the key. + * + * @since If you're using Redis >= 2.6.12, you can pass extended options as explained in example + * + * @param string $key + * @param string|mixed $value string if not used serializer + * @param int|array $timeout [optional] Calling setex() is preferred if you want a timeout.
+ * Since 2.6.12 it also supports different flags inside an array. Example ['NX', 'EX' => 60]
+ * - EX seconds -- Set the specified expire time, in seconds.
+ * - PX milliseconds -- Set the specified expire time, in milliseconds.
+ * - NX -- Only set the key if it does not already exist.
+ * - XX -- Only set the key if it already exist.
+ *
+     * // Simple key -> value set
+     * $redis->set('key', 'value');
+     *
+     * // Will redirect, and actually make an SETEX call
+     * $redis->set('key','value', 10);
+     *
+     * // Will set the key, if it doesn't exist, with a ttl of 10 seconds
+     * $redis->set('key', 'value', ['nx', 'ex' => 10]);
+     *
+     * // Will set a key, if it does exist, with a ttl of 1000 milliseconds
+     * $redis->set('key', 'value', ['xx', 'px' => 1000]);
+     * 
+ * + * @return bool TRUE if the command is successful + * + * @link https://redis.io/commands/set + */ + public function set($key, $value, $timeout = null) + { + } + + /** + * Set the string value in argument as value of the key, with a time to live. + * + * @param string $key + * @param int $ttl + * @param string|mixed $value + * + * @return bool TRUE if the command is successful + * + * @link https://redis.io/commands/setex + * @example $redis->setex('key', 3600, 'value'); // sets key → value, with 1h TTL. + */ + public function setex($key, $ttl, $value) + { + } + + /** + * Set the value and expiration in milliseconds of a key. + * + * @see setex() + * @param string $key + * @param int $ttl, in milliseconds. + * @param string|mixed $value + * + * @return bool TRUE if the command is successful + * + * @link https://redis.io/commands/psetex + * @example $redis->psetex('key', 1000, 'value'); // sets key → value, with 1sec TTL. + */ + public function psetex($key, $ttl, $value) + { + } + + /** + * Set the string value in argument as value of the key if the key doesn't already exist in the database. + * + * @param string $key + * @param string|mixed $value + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/setnx + * @example + *
+     * $redis->setnx('key', 'value');   // return TRUE
+     * $redis->setnx('key', 'value');   // return FALSE
+     * 
+ */ + public function setnx($key, $value) + { + } + + /** + * Remove specified keys. + * + * @param int|string|array $key1 An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN + * @param int|string ...$otherKeys + * + * @return int Number of keys deleted + * + * @link https://redis.io/commands/del + * @example + *
+     * $redis->set('key1', 'val1');
+     * $redis->set('key2', 'val2');
+     * $redis->set('key3', 'val3');
+     * $redis->set('key4', 'val4');
+     *
+     * $redis->del('key1', 'key2');     // return 2
+     * $redis->del(['key3', 'key4']);   // return 2
+     * 
+ */ + public function del($key1, ...$otherKeys) + { + } + + /** + * @see del() + * @deprecated use Redis::del() + * + * @param string|string[] $key1 + * @param string $key2 + * @param string $key3 + * + * @return int Number of keys deleted + */ + public function delete($key1, $key2 = null, $key3 = null) + { + } + + /** + * Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking. + * + * @see del() + * @param string|string[] $key1 + * @param string $key2 + * @param string $key3 + * + * @return int Number of keys unlinked. + * + * @link https://redis.io/commands/unlink + * @example + *
+     * $redis->set('key1', 'val1');
+     * $redis->set('key2', 'val2');
+     * $redis->set('key3', 'val3');
+     * $redis->set('key4', 'val4');
+     * $redis->unlink('key1', 'key2');          // return 2
+     * $redis->unlink(array('key3', 'key4'));   // return 2
+     * 
+ */ + public function unlink($key1, $key2 = null, $key3 = null) + { + } + + /** + * Enter and exit transactional mode. + * + * @param int $mode Redis::MULTI|Redis::PIPELINE + * Defaults to Redis::MULTI. + * A Redis::MULTI block of commands runs as a single transaction; + * a Redis::PIPELINE block is simply transmitted faster to the server, but without any guarantee of atomicity. + * discard cancels a transaction. + * + * @return Redis returns the Redis instance and enters multi-mode. + * Once in multi-mode, all subsequent method calls return the same object until exec() is called. + * + * @link https://redis.io/commands/multi + * @example + *
+     * $ret = $redis->multi()
+     *      ->set('key1', 'val1')
+     *      ->get('key1')
+     *      ->set('key2', 'val2')
+     *      ->get('key2')
+     *      ->exec();
+     *
+     * //$ret == array (
+     * //    0 => TRUE,
+     * //    1 => 'val1',
+     * //    2 => TRUE,
+     * //    3 => 'val2');
+     * 
+ */ + public function multi($mode = Redis::MULTI) + { + } + + /** + * Returns a Redis instance which can simply transmitted faster to the server. + * + * @return Redis returns the Redis instance. + * Once in pipeline-mode, all subsequent method calls return the same object until exec() is called. + * Pay attention, that Pipeline is not a transaction, so you can get unexpected + * results in case of big pipelines and small read/write timeouts. + * + * @link https://redis.io/topics/pipelining + * @example + *
+     * $ret = $this->redis->pipeline()
+     *      ->ping()
+     *      ->multi()->set('x', 42)->incr('x')->exec()
+     *      ->ping()
+     *      ->multi()->get('x')->del('x')->exec()
+     *      ->ping()
+     *      ->exec();
+     *
+     * //$ret == array (
+     * //    0 => '+PONG',
+     * //    1 => [TRUE, 43],
+     * //    2 => '+PONG',
+     * //    3 => [43, 1],
+     * //    4 => '+PONG');
+     * 
+ */ + public function pipeline() + { + } + + + /** + * @return void|array + * + * @see multi() + * @link https://redis.io/commands/exec + */ + public function exec() + { + } + + /** + * @see multi() + * @link https://redis.io/commands/discard + */ + public function discard() + { + } + + /** + * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC, + * the MULTI/EXEC transaction will fail (return FALSE). unwatch cancels all the watching of all keys by this client. + * @param string|string[] $key a list of keys + * + * @return void + * + * @link https://redis.io/commands/watch + * @example + *
+     * $redis->watch('x');
+     * // long code here during the execution of which other clients could well modify `x`
+     * $ret = $redis->multi()
+     *          ->incr('x')
+     *          ->exec();
+     * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC.
+     * 
+ */ + public function watch($key) + { + } + + /** + * @see watch() + * @link https://redis.io/commands/unwatch + */ + public function unwatch() + { + } + + /** + * Subscribe to channels. + * + * Warning: this function will probably change in the future. + * + * @param string[] $channels an array of channels to subscribe + * @param string|array $callback either a string or an array($instance, 'method_name'). + * The callback function receives 3 parameters: the redis instance, the channel name, and the message. + * + * @return mixed|null Any non-null return value in the callback will be returned to the caller. + * + * @link https://redis.io/commands/subscribe + * @example + *
+     * function f($redis, $chan, $msg) {
+     *  switch($chan) {
+     *      case 'chan-1':
+     *          ...
+     *          break;
+     *
+     *      case 'chan-2':
+     *                     ...
+     *          break;
+     *
+     *      case 'chan-2':
+     *          ...
+     *          break;
+     *      }
+     * }
+     *
+     * $redis->subscribe(array('chan-1', 'chan-2', 'chan-3'), 'f'); // subscribe to 3 chans
+     * 
+ */ + public function subscribe($channels, $callback) + { + } + + /** + * Subscribe to channels by pattern + * + * @param array $patterns an array of glob-style patterns to subscribe + * @param string|array $callback Either a string or an array with an object and method. + * The callback will get four arguments ($redis, $pattern, $channel, $message) + * @param mixed Any non-null return value in the callback will be returned to the caller + * + * @link https://redis.io/commands/psubscribe + * @example + *
+     * function psubscribe($redis, $pattern, $chan, $msg) {
+     *  echo "Pattern: $pattern\n";
+     *  echo "Channel: $chan\n";
+     *  echo "Payload: $msg\n";
+     * }
+     * 
+ */ + public function psubscribe($patterns, $callback) + { + } + + /** + * Publish messages to channels. + * + * Warning: this function will probably change in the future. + * + * @param string $channel a channel to publish to + * @param string $message string + * + * @return int Number of clients that received the message + * + * @link https://redis.io/commands/publish + * @example $redis->publish('chan-1', 'hello, world!'); // send message. + */ + public function publish($channel, $message) + { + } + + /** + * A command allowing you to get information on the Redis pub/sub system + * + * @param string $keyword String, which can be: "channels", "numsub", or "numpat" + * @param string|array $argument Optional, variant. + * For the "channels" subcommand, you can pass a string pattern. + * For "numsub" an array of channel names + * + * @return array|int Either an integer or an array. + * - channels Returns an array where the members are the matching channels. + * - numsub Returns a key/value array where the keys are channel names and + * values are their counts. + * - numpat Integer return containing the number active pattern subscriptions + * + * @link https://redis.io/commands/pubsub + * @example + *
+     * $redis->pubsub('channels'); // All channels
+     * $redis->pubsub('channels', '*pattern*'); // Just channels matching your pattern
+     * $redis->pubsub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2'
+     * $redis->pubsub('numpat'); // Get the number of pattern subscribers
+     * 
+ */ + public function pubsub($keyword, $argument) + { + } + + /** + * Stop listening for messages posted to the given channels. + * + * @param array $channels an array of channels to usubscribe + * + * @link https://redis.io/commands/unsubscribe + */ + public function unsubscribe($channels = null) + { + } + + /** + * Stop listening for messages posted to the given channels. + * + * @param array $patterns an array of glob-style patterns to unsubscribe + * + * @link https://redis.io/commands/punsubscribe + */ + public function punsubscribe($patterns = null) + { + } + + /** + * Verify if the specified key/keys exists + * + * This function took a single argument and returned TRUE or FALSE in phpredis versions < 4.0.0. + * + * @since >= 4.0 Returned int, if < 4.0 returned bool + * + * @param string|string[] $key + * + * @return int|bool The number of keys tested that do exist + * + * @link https://redis.io/commands/exists + * @link https://github.com/phpredis/phpredis#exists + * @example + *
+     * $redis->exists('key'); // 1
+     * $redis->exists('NonExistingKey'); // 0
+     *
+     * $redis->mset(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']);
+     * $redis->exists(['foo', 'bar', 'baz]); // 3
+     * $redis->exists('foo', 'bar', 'baz'); // 3
+     * 
+ */ + public function exists($key) + { + } + + /** + * Increment the number stored at key by one. + * + * @param string $key + * + * @return int the new value + * + * @link https://redis.io/commands/incr + * @example + *
+     * $redis->incr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value 1
+     * $redis->incr('key1'); // 2
+     * $redis->incr('key1'); // 3
+     * $redis->incr('key1'); // 4
+     * 
+ */ + public function incr($key) + { + } + + /** + * Increment the float value of a key by the given amount + * + * @param string $key + * @param float $increment + * + * @return float + * + * @link https://redis.io/commands/incrbyfloat + * @example + *
+     * $redis->set('x', 3);
+     * $redis->incrByFloat('x', 1.5);   // float(4.5)
+     * $redis->get('x');                // float(4.5)
+     * 
+ */ + public function incrByFloat($key, $increment) + { + } + + /** + * Increment the number stored at key by one. + * If the second argument is filled, it will be used as the integer value of the increment. + * + * @param string $key key + * @param int $value value that will be added to key (only for incrBy) + * + * @return int the new value + * + * @link https://redis.io/commands/incrby + * @example + *
+     * $redis->incr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value 1
+     * $redis->incr('key1');        // 2
+     * $redis->incr('key1');        // 3
+     * $redis->incr('key1');        // 4
+     * $redis->incrBy('key1', 10);  // 14
+     * 
+ */ + public function incrBy($key, $value) + { + } + + /** + * Decrement the number stored at key by one. + * + * @param string $key + * + * @return int the new value + * + * @link https://redis.io/commands/decr + * @example + *
+     * $redis->decr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value -1
+     * $redis->decr('key1'); // -2
+     * $redis->decr('key1'); // -3
+     * 
+ */ + public function decr($key) + { + } + + /** + * Decrement the number stored at key by one. + * If the second argument is filled, it will be used as the integer value of the decrement. + * + * @param string $key + * @param int $value that will be subtracted to key (only for decrBy) + * + * @return int the new value + * + * @link https://redis.io/commands/decrby + * @example + *
+     * $redis->decr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value -1
+     * $redis->decr('key1');        // -2
+     * $redis->decr('key1');        // -3
+     * $redis->decrBy('key1', 10);  // -13
+     * 
+ */ + public function decrBy($key, $value) + { + } + + /** + * Adds the string values to the head (left) of the list. + * Creates the list if the key didn't exist. + * If the key exists and is not a list, FALSE is returned. + * + * @param string $key + * @param string|mixed $value1... Variadic list of values to push in key, if dont used serialized, used string + * + * @return int|bool The new length of the list in case of success, FALSE in case of Failure + * + * @link https://redis.io/commands/lpush + * @example + *
+     * $redis->lPush('l', 'v1', 'v2', 'v3', 'v4')   // int(4)
+     * var_dump( $redis->lRange('l', 0, -1) );
+     * // Output:
+     * // array(4) {
+     * //   [0]=> string(2) "v4"
+     * //   [1]=> string(2) "v3"
+     * //   [2]=> string(2) "v2"
+     * //   [3]=> string(2) "v1"
+     * // }
+     * 
+ */ + public function lPush($key, ...$value1) + { + } + + /** + * Adds the string values to the tail (right) of the list. + * Creates the list if the key didn't exist. + * If the key exists and is not a list, FALSE is returned. + * + * @param string $key + * @param string|mixed $value1... Variadic list of values to push in key, if dont used serialized, used string + * + * @return int|bool The new length of the list in case of success, FALSE in case of Failure + * + * @link https://redis.io/commands/rpush + * @example + *
+     * $redis->rPush('l', 'v1', 'v2', 'v3', 'v4');    // int(4)
+     * var_dump( $redis->lRange('l', 0, -1) );
+     * // Output:
+     * // array(4) {
+     * //   [0]=> string(2) "v1"
+     * //   [1]=> string(2) "v2"
+     * //   [2]=> string(2) "v3"
+     * //   [3]=> string(2) "v4"
+     * // }
+     * 
+ */ + public function rPush($key, ...$value1) + { + } + + /** + * Adds the string value to the head (left) of the list if the list exists. + * + * @param string $key + * @param string|mixed $value String, value to push in key + * + * @return int|bool The new length of the list in case of success, FALSE in case of Failure. + * + * @link https://redis.io/commands/lpushx + * @example + *
+     * $redis->del('key1');
+     * $redis->lPushx('key1', 'A');     // returns 0
+     * $redis->lPush('key1', 'A');      // returns 1
+     * $redis->lPushx('key1', 'B');     // returns 2
+     * $redis->lPushx('key1', 'C');     // returns 3
+     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
+     * 
+ */ + public function lPushx($key, $value) + { + } + + /** + * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure. + * + * @param string $key + * @param string|mixed $value String, value to push in key + * + * @return int|bool The new length of the list in case of success, FALSE in case of Failure. + * + * @link https://redis.io/commands/rpushx + * @example + *
+     * $redis->del('key1');
+     * $redis->rPushx('key1', 'A'); // returns 0
+     * $redis->rPush('key1', 'A'); // returns 1
+     * $redis->rPushx('key1', 'B'); // returns 2
+     * $redis->rPushx('key1', 'C'); // returns 3
+     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
+     * 
+ */ + public function rPushx($key, $value) + { + } + + /** + * Returns and removes the first element of the list. + * + * @param string $key + * + * @return mixed|bool if command executed successfully BOOL FALSE in case of failure (empty list) + * + * @link https://redis.io/commands/lpop + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redis->lPop('key1');        // key1 => [ 'B', 'C' ]
+     * 
+ */ + public function lPop($key) + { + } + + /** + * Returns and removes the last element of the list. + * + * @param string $key + * + * @return mixed|bool if command executed successfully BOOL FALSE in case of failure (empty list) + * + * @link https://redis.io/commands/rpop + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redis->rPop('key1');        // key1 => [ 'A', 'B' ]
+     * 
+ */ + public function rPop($key) + { + } + + /** + * Is a blocking lPop primitive. If at least one of the lists contains at least one element, + * the element will be popped from the head of the list and returned to the caller. + * Il all the list identified by the keys passed in arguments are empty, blPop will block + * during the specified timeout until an element is pushed to one of those lists. This element will be popped. + * + * @param string|string[] $keys String array containing the keys of the lists OR variadic list of strings + * @param int $timeout Timeout is always the required final parameter + * + * @return array ['listName', 'element'] + * + * @link https://redis.io/commands/blpop + * @example + *
+     * // Non blocking feature
+     * $redis->lPush('key1', 'A');
+     * $redis->del('key2');
+     *
+     * $redis->blPop('key1', 'key2', 10);        // array('key1', 'A')
+     * // OR
+     * $redis->blPop(['key1', 'key2'], 10);      // array('key1', 'A')
+     *
+     * $redis->brPop('key1', 'key2', 10);        // array('key1', 'A')
+     * // OR
+     * $redis->brPop(['key1', 'key2'], 10); // array('key1', 'A')
+     *
+     * // Blocking feature
+     *
+     * // process 1
+     * $redis->del('key1');
+     * $redis->blPop('key1', 10);
+     * // blocking for 10 seconds
+     *
+     * // process 2
+     * $redis->lPush('key1', 'A');
+     *
+     * // process 1
+     * // array('key1', 'A') is returned
+     * 
+ */ + public function blPop($keys, $timeout) + { + } + + /** + * Is a blocking rPop primitive. If at least one of the lists contains at least one element, + * the element will be popped from the head of the list and returned to the caller. + * Il all the list identified by the keys passed in arguments are empty, brPop will + * block during the specified timeout until an element is pushed to one of those lists. T + * his element will be popped. + * + * @param string|string[] $keys String array containing the keys of the lists OR variadic list of strings + * @param int $timeout Timeout is always the required final parameter + * + * @return array ['listName', 'element'] + * + * @link https://redis.io/commands/brpop + * @example + *
+     * // Non blocking feature
+     * $redis->lPush('key1', 'A');
+     * $redis->del('key2');
+     *
+     * $redis->blPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redis->blPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * $redis->brPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redis->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * // Blocking feature
+     *
+     * // process 1
+     * $redis->del('key1');
+     * $redis->blPop('key1', 10);
+     * // blocking for 10 seconds
+     *
+     * // process 2
+     * $redis->lPush('key1', 'A');
+     *
+     * // process 1
+     * // array('key1', 'A') is returned
+     * 
+ */ + public function brPop(array $keys, $timeout) + { + } + + /** + * Returns the size of a list identified by Key. If the list didn't exist or is empty, + * the command returns 0. If the data type identified by Key is not a list, the command return FALSE. + * + * @param string $key + * + * @return int|bool The size of the list identified by Key exists. + * bool FALSE if the data type identified by Key is not list + * + * @link https://redis.io/commands/llen + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C'); // key1 => [ 'A', 'B', 'C' ]
+     * $redis->lLen('key1');       // 3
+     * $redis->rPop('key1');
+     * $redis->lLen('key1');       // 2
+     * 
+ */ + public function lLen($key) + { + } + + /** + * @see lLen() + * @link https://redis.io/commands/llen + * @deprecated use Redis::lLen() + * + * @param string $key + * + * @return int The size of the list identified by Key exists + */ + public function lSize($key) + { + } + + /** + * Return the specified element of the list stored at the specified key. + * 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ... + * Return FALSE in case of a bad index or a key that doesn't point to a list. + * + * @param string $key + * @param int $index + * + * @return mixed|bool the element at this index + * + * Bool FALSE if the key identifies a non-string data type, or no value corresponds to this index in the list Key. + * + * @link https://redis.io/commands/lindex + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redis->lIndex('key1', 0);     // 'A'
+     * $redis->lIndex('key1', -1);    // 'C'
+     * $redis->lIndex('key1', 10);    // `FALSE`
+     * 
+ */ + public function lIndex($key, $index) + { + } + + /** + * @see lIndex() + * @link https://redis.io/commands/lindex + * @deprecated use Redis::lIndex() + * + * @param string $key + * @param int $index + * @return mixed|bool the element at this index + */ + public function lGet($key, $index) + { + } + + /** + * Set the list at index with the new value. + * + * @param string $key + * @param int $index + * @param string $value + * + * @return bool TRUE if the new value is setted. + * FALSE if the index is out of range, or data type identified by key is not a list. + * + * @link https://redis.io/commands/lset + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');    // key1 => [ 'A', 'B', 'C' ]
+     * $redis->lIndex('key1', 0);     // 'A'
+     * $redis->lSet('key1', 0, 'X');
+     * $redis->lIndex('key1', 0);     // 'X'
+     * 
+ */ + public function lSet($key, $index, $value) + { + } + + /** + * Returns the specified elements of the list stored at the specified key in + * the range [start, end]. start and stop are interpretated as indices: 0 the first element, + * 1 the second ... -1 the last element, -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * + * @return array containing the values in specified range. + * + * @link https://redis.io/commands/lrange + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');
+     * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C')
+     * 
+ */ + public function lRange($key, $start, $end) + { + } + + /** + * @see lRange() + * @link https://redis.io/commands/lrange + * @deprecated use Redis::lRange() + * + * @param string $key + * @param int $start + * @param int $end + * @return array + */ + public function lGetRange($key, $start, $end) + { + } + + /** + * Trims an existing list so that it will contain only a specified range of elements. + * + * @param string $key + * @param int $start + * @param int $stop + * + * @return array|bool Bool return FALSE if the key identify a non-list value + * + * @link https://redis.io/commands/ltrim + * @example + *
+     * $redis->rPush('key1', 'A');
+     * $redis->rPush('key1', 'B');
+     * $redis->rPush('key1', 'C');
+     * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C')
+     * $redis->lTrim('key1', 0, 1);
+     * $redis->lRange('key1', 0, -1); // array('A', 'B')
+     * 
+ */ + public function lTrim($key, $start, $stop) + { + } + + /** + * @see lTrim() + * @link https://redis.io/commands/ltrim + * @deprecated use Redis::lTrim() + * + * @param string $key + * @param int $start + * @param int $stop + */ + public function listTrim($key, $start, $stop) + { + } + + /** + * Removes the first count occurrences of the value element from the list. + * If count is zero, all the matching elements are removed. If count is negative, + * elements are removed from tail to head. + * + * @param string $key + * @param string $value + * @param int $count + * + * @return int|bool the number of elements to remove + * bool FALSE if the value identified by key is not a list. + * + * @link https://redis.io/commands/lrem + * @example + *
+     * $redis->lPush('key1', 'A');
+     * $redis->lPush('key1', 'B');
+     * $redis->lPush('key1', 'C');
+     * $redis->lPush('key1', 'A');
+     * $redis->lPush('key1', 'A');
+     *
+     * $redis->lRange('key1', 0, -1);   // array('A', 'A', 'C', 'B', 'A')
+     * $redis->lRem('key1', 'A', 2);    // 2
+     * $redis->lRange('key1', 0, -1);   // array('C', 'B', 'A')
+     * 
+ */ + public function lRem($key, $value, $count) + { + } + + /** + * @see lRem + * @link https://redis.io/commands/lremove + * @deprecated use Redis::lRem() + * + * @param string $key + * @param string $value + * @param int $count + */ + public function lRemove($key, $value, $count) + { + } + + /** + * Insert value in the list before or after the pivot value. the parameter options + * specify the position of the insert (before or after). If the list didn't exists, + * or the pivot didn't exists, the value is not inserted. + * + * @param string $key + * @param int $position Redis::BEFORE | Redis::AFTER + * @param string $pivot + * @param string|mixed $value + * + * @return int The number of the elements in the list, -1 if the pivot didn't exists. + * + * @link https://redis.io/commands/linsert + * @example + *
+     * $redis->del('key1');
+     * $redis->lInsert('key1', Redis::AFTER, 'A', 'X');     // 0
+     *
+     * $redis->lPush('key1', 'A');
+     * $redis->lPush('key1', 'B');
+     * $redis->lPush('key1', 'C');
+     *
+     * $redis->lInsert('key1', Redis::BEFORE, 'C', 'X');    // 4
+     * $redis->lRange('key1', 0, -1);                       // array('A', 'B', 'X', 'C')
+     *
+     * $redis->lInsert('key1', Redis::AFTER, 'C', 'Y');     // 5
+     * $redis->lRange('key1', 0, -1);                       // array('A', 'B', 'X', 'C', 'Y')
+     *
+     * $redis->lInsert('key1', Redis::AFTER, 'W', 'value'); // -1
+     * 
+ */ + public function lInsert($key, $position, $pivot, $value) + { + } + + /** + * Adds a values to the set value stored at key. + * + * @param string $key Required key + * @param string|mixed ...$value1 Variadic list of values + * + * @return int|bool The number of elements added to the set. + * If this value is already in the set, FALSE is returned + * + * @link https://redis.io/commands/sadd + * @example + *
+     * $redis->sAdd('k', 'v1');                // int(1)
+     * $redis->sAdd('k', 'v1', 'v2', 'v3');    // int(2)
+     * 
+ */ + public function sAdd($key, ...$value1) + { + } + + /** + * Removes the specified members from the set value stored at key. + * + * @param string $key + * @param string|mixed ...$member1 Variadic list of members + * + * @return int The number of elements removed from the set + * + * @link https://redis.io/commands/srem + * @example + *
+     * var_dump( $redis->sAdd('k', 'v1', 'v2', 'v3') );    // int(3)
+     * var_dump( $redis->sRem('k', 'v2', 'v3') );          // int(2)
+     * var_dump( $redis->sMembers('k') );
+     * //// Output:
+     * // array(1) {
+     * //   [0]=> string(2) "v1"
+     * // }
+     * 
+ */ + public function sRem($key, ...$member1) + { + } + + /** + * @see sRem() + * @link https://redis.io/commands/srem + * @deprecated use Redis::sRem() + * + * @param string $key + * @param string|mixed ...$member1 + */ + public function sRemove($key, ...$member1) + { + } + + /** + * Moves the specified member from the set at srcKey to the set at dstKey. + * + * @param string $srcKey + * @param string $dstKey + * @param string|mixed $member + * + * @return bool If the operation is successful, return TRUE. + * If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned. + * + * @link https://redis.io/commands/smove + * @example + *
+     * $redis->sAdd('key1' , 'set11');
+     * $redis->sAdd('key1' , 'set12');
+     * $redis->sAdd('key1' , 'set13');          // 'key1' => {'set11', 'set12', 'set13'}
+     * $redis->sAdd('key2' , 'set21');
+     * $redis->sAdd('key2' , 'set22');          // 'key2' => {'set21', 'set22'}
+     * $redis->sMove('key1', 'key2', 'set13');  // 'key1' =>  {'set11', 'set12'}
+     *                                          // 'key2' =>  {'set21', 'set22', 'set13'}
+     * 
+ */ + public function sMove($srcKey, $dstKey, $member) + { + } + + /** + * Checks if value is a member of the set stored at the key key. + * + * @param string $key + * @param string|mixed $value + * + * @return bool TRUE if value is a member of the set at key key, FALSE otherwise + * + * @link https://redis.io/commands/sismember + * @example + *
+     * $redis->sAdd('key1' , 'set1');
+     * $redis->sAdd('key1' , 'set2');
+     * $redis->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
+     *
+     * $redis->sIsMember('key1', 'set1'); // TRUE
+     * $redis->sIsMember('key1', 'setX'); // FALSE
+     * 
+ */ + public function sIsMember($key, $value) + { + } + + /** + * @see sIsMember() + * @link https://redis.io/commands/sismember + * @deprecated use Redis::sIsMember() + * + * @param string $key + * @param string|mixed $value + */ + public function sContains($key, $value) + { + } + + /** + * Returns the cardinality of the set identified by key. + * + * @param string $key + * + * @return int the cardinality of the set identified by key, 0 if the set doesn't exist. + * + * @link https://redis.io/commands/scard + * @example + *
+     * $redis->sAdd('key1' , 'set1');
+     * $redis->sAdd('key1' , 'set2');
+     * $redis->sAdd('key1' , 'set3');   // 'key1' => {'set1', 'set2', 'set3'}
+     * $redis->sCard('key1');           // 3
+     * $redis->sCard('keyX');           // 0
+     * 
+ */ + public function sCard($key) + { + } + + /** + * Removes and returns a random element from the set value at Key. + * + * @param string $key + * @param int $count [optional] + * + * @return string|mixed|array|bool "popped" values + * bool FALSE if set identified by key is empty or doesn't exist. + * + * @link https://redis.io/commands/spop + * @example + *
+     * $redis->sAdd('key1' , 'set1');
+     * $redis->sAdd('key1' , 'set2');
+     * $redis->sAdd('key1' , 'set3');   // 'key1' => {'set3', 'set1', 'set2'}
+     * $redis->sPop('key1');            // 'set1', 'key1' => {'set3', 'set2'}
+     * $redis->sPop('key1');            // 'set3', 'key1' => {'set2'}
+     *
+     * // With count
+     * $redis->sAdd('key2', 'set1', 'set2', 'set3');
+     * var_dump( $redis->sPop('key2', 3) ); // Will return all members but in no particular order
+     *
+     * // array(3) {
+     * //   [0]=> string(4) "set2"
+     * //   [1]=> string(4) "set3"
+     * //   [2]=> string(4) "set1"
+     * // }
+     * 
+ */ + public function sPop($key, $count = 1) + { + } + + /** + * Returns a random element(s) from the set value at Key, without removing it. + * + * @param string $key + * @param int $count [optional] + * + * @return string|mixed|array|bool value(s) from the set + * bool FALSE if set identified by key is empty or doesn't exist and count argument isn't passed. + * + * @link https://redis.io/commands/srandmember + * @example + *
+     * $redis->sAdd('key1' , 'one');
+     * $redis->sAdd('key1' , 'two');
+     * $redis->sAdd('key1' , 'three');              // 'key1' => {'one', 'two', 'three'}
+     *
+     * var_dump( $redis->sRandMember('key1') );     // 'key1' => {'one', 'two', 'three'}
+     *
+     * // string(5) "three"
+     *
+     * var_dump( $redis->sRandMember('key1', 2) );  // 'key1' => {'one', 'two', 'three'}
+     *
+     * // array(2) {
+     * //   [0]=> string(2) "one"
+     * //   [1]=> string(5) "three"
+     * // }
+     * 
+ */ + public function sRandMember($key, $count = 1) + { + } + + /** + * Returns the members of a set resulting from the intersection of all the sets + * held at the specified keys. If just a single key is specified, then this command + * produces the members of this set. If one of the keys is missing, FALSE is returned. + * + * @param string $key1 keys identifying the different sets on which we will apply the intersection. + * @param string ...$otherKeys variadic list of keys + * + * @return array contain the result of the intersection between those keys + * If the intersection between the different sets is empty, the return value will be empty array. + * + * @link https://redis.io/commands/sinter + * @example + *
+     * $redis->sAdd('key1', 'val1');
+     * $redis->sAdd('key1', 'val2');
+     * $redis->sAdd('key1', 'val3');
+     * $redis->sAdd('key1', 'val4');
+     *
+     * $redis->sAdd('key2', 'val3');
+     * $redis->sAdd('key2', 'val4');
+     *
+     * $redis->sAdd('key3', 'val3');
+     * $redis->sAdd('key3', 'val4');
+     *
+     * var_dump($redis->sInter('key1', 'key2', 'key3'));
+     *
+     * //array(2) {
+     * //  [0]=>
+     * //  string(4) "val4"
+     * //  [1]=>
+     * //  string(4) "val3"
+     * //}
+     * 
+ */ + public function sInter($key1, ...$otherKeys) + { + } + + /** + * Performs a sInter command and stores the result in a new set. + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 keys identifying the different sets on which we will apply the intersection. + * @param string ...$otherKeys variadic list of keys + * + * @return int|bool The cardinality of the resulting set, or FALSE in case of a missing key + * + * @link https://redis.io/commands/sinterstore + * @example + *
+     * $redis->sAdd('key1', 'val1');
+     * $redis->sAdd('key1', 'val2');
+     * $redis->sAdd('key1', 'val3');
+     * $redis->sAdd('key1', 'val4');
+     *
+     * $redis->sAdd('key2', 'val3');
+     * $redis->sAdd('key2', 'val4');
+     *
+     * $redis->sAdd('key3', 'val3');
+     * $redis->sAdd('key3', 'val4');
+     *
+     * var_dump($redis->sInterStore('output', 'key1', 'key2', 'key3'));
+     * var_dump($redis->sMembers('output'));
+     *
+     * //int(2)
+     * //
+     * //array(2) {
+     * //  [0]=>
+     * //  string(4) "val4"
+     * //  [1]=>
+     * //  string(4) "val3"
+     * //}
+     * 
+ */ + public function sInterStore($dstKey, $key1, ...$otherKeys) + { + } + + /** + * Performs the union between N sets and returns it. + * + * @param string $key1 first key for union + * @param string ...$otherKeys variadic list of keys corresponding to sets in redis + * + * @return array string[] The union of all these sets + * + * @link https://redis.io/commands/sunionstore + * @example + *
+     * $redis->sAdd('s0', '1');
+     * $redis->sAdd('s0', '2');
+     * $redis->sAdd('s1', '3');
+     * $redis->sAdd('s1', '1');
+     * $redis->sAdd('s2', '3');
+     * $redis->sAdd('s2', '4');
+     *
+     * var_dump($redis->sUnion('s0', 's1', 's2'));
+     *
+     * array(4) {
+     * //  [0]=>
+     * //  string(1) "3"
+     * //  [1]=>
+     * //  string(1) "4"
+     * //  [2]=>
+     * //  string(1) "1"
+     * //  [3]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sUnion($key1, ...$otherKeys) + { + } + + /** + * Performs the same action as sUnion, but stores the result in the first key + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 first key for union + * @param string ...$otherKeys variadic list of keys corresponding to sets in redis + * + * @return int Any number of keys corresponding to sets in redis + * + * @link https://redis.io/commands/sunionstore + * @example + *
+     * $redis->del('s0', 's1', 's2');
+     *
+     * $redis->sAdd('s0', '1');
+     * $redis->sAdd('s0', '2');
+     * $redis->sAdd('s1', '3');
+     * $redis->sAdd('s1', '1');
+     * $redis->sAdd('s2', '3');
+     * $redis->sAdd('s2', '4');
+     *
+     * var_dump($redis->sUnionStore('dst', 's0', 's1', 's2'));
+     * var_dump($redis->sMembers('dst'));
+     *
+     * //int(4)
+     * //array(4) {
+     * //  [0]=>
+     * //  string(1) "3"
+     * //  [1]=>
+     * //  string(1) "4"
+     * //  [2]=>
+     * //  string(1) "1"
+     * //  [3]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sUnionStore($dstKey, $key1, ...$otherKeys) + { + } + + /** + * Performs the difference between N sets and returns it. + * + * @param string $key1 first key for diff + * @param string ...$otherKeys variadic list of keys corresponding to sets in redis + * + * @return array string[] The difference of the first set will all the others + * + * @link https://redis.io/commands/sdiff + * @example + *
+     * $redis->del('s0', 's1', 's2');
+     *
+     * $redis->sAdd('s0', '1');
+     * $redis->sAdd('s0', '2');
+     * $redis->sAdd('s0', '3');
+     * $redis->sAdd('s0', '4');
+     *
+     * $redis->sAdd('s1', '1');
+     * $redis->sAdd('s2', '3');
+     *
+     * var_dump($redis->sDiff('s0', 's1', 's2'));
+     *
+     * //array(2) {
+     * //  [0]=>
+     * //  string(1) "4"
+     * //  [1]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sDiff($key1, ...$otherKeys) + { + } + + /** + * Performs the same action as sDiff, but stores the result in the first key + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 first key for diff + * @param string ...$otherKeys variadic list of keys corresponding to sets in redis + * + * @return int|bool The cardinality of the resulting set, or FALSE in case of a missing key + * + * @link https://redis.io/commands/sdiffstore + * @example + *
+     * $redis->del('s0', 's1', 's2');
+     *
+     * $redis->sAdd('s0', '1');
+     * $redis->sAdd('s0', '2');
+     * $redis->sAdd('s0', '3');
+     * $redis->sAdd('s0', '4');
+     *
+     * $redis->sAdd('s1', '1');
+     * $redis->sAdd('s2', '3');
+     *
+     * var_dump($redis->sDiffStore('dst', 's0', 's1', 's2'));
+     * var_dump($redis->sMembers('dst'));
+     *
+     * //int(2)
+     * //array(2) {
+     * //  [0]=>
+     * //  string(1) "4"
+     * //  [1]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sDiffStore($dstKey, $key1, ...$otherKeys) + { + } + + /** + * Returns the contents of a set. + * + * @param string $key + * + * @return array An array of elements, the contents of the set + * + * @link https://redis.io/commands/smembers + * @example + *
+     * $redis->del('s');
+     * $redis->sAdd('s', 'a');
+     * $redis->sAdd('s', 'b');
+     * $redis->sAdd('s', 'a');
+     * $redis->sAdd('s', 'c');
+     * var_dump($redis->sMembers('s'));
+     *
+     * //array(3) {
+     * //  [0]=>
+     * //  string(1) "c"
+     * //  [1]=>
+     * //  string(1) "a"
+     * //  [2]=>
+     * //  string(1) "b"
+     * //}
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function sMembers($key) + { + } + + /** + * @see sMembers() + * @link https://redis.io/commands/smembers + * @deprecated use Redis::sMembers() + * + * @param string $key + * @return array An array of elements, the contents of the set + */ + public function sGetMembers($key) + { + } + + /** + * Scan a set for members + * + * @param string $key The set to search. + * @param int $iterator LONG (reference) to the iterator as we go. + * @param string $pattern String, optional pattern to match against. + * @param int $count How many members to return at a time (Redis might return a different amount) + * + * @return array|bool PHPRedis will return an array of keys or FALSE when we're done iterating + * + * @link https://redis.io/commands/sscan + * @example + *
+     * $iterator = null;
+     * while ($members = $redis->sScan('set', $iterator)) {
+     *     foreach ($members as $member) {
+     *         echo $member . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function sScan($key, &$iterator, $pattern = null, $count = 0) + { + } + + /** + * Sets a value and returns the previous entry at that key. + * + * @param string $key + * @param string|mixed $value + * + * @return string|mixed A string (mixed, if used serializer), the previous value located at this key + * + * @link https://redis.io/commands/getset + * @example + *
+     * $redis->set('x', '42');
+     * $exValue = $redis->getSet('x', 'lol');   // return '42', replaces x by 'lol'
+     * $newValue = $redis->get('x')'            // return 'lol'
+     * 
+ */ + public function getSet($key, $value) + { + } + + /** + * Returns a random key + * + * @return string an existing key in redis + * + * @link https://redis.io/commands/randomkey + * @example + *
+     * $key = $redis->randomKey();
+     * $surprise = $redis->get($key);  // who knows what's in there.
+     * 
+ */ + public function randomKey() + { + } + + /** + * Switches to a given database + * + * @param int $dbIndex + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/select + * @example + *
+     * $redis->select(0);       // switch to DB 0
+     * $redis->set('x', '42');  // write 42 to x
+     * $redis->move('x', 1);    // move to DB 1
+     * $redis->select(1);       // switch to DB 1
+     * $redis->get('x');        // will return 42
+     * 
+ */ + public function select($dbIndex) + { + } + + /** + * Moves a key to a different database. + * + * @param string $key + * @param int $dbIndex + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/move + * @example + *
+     * $redis->select(0);       // switch to DB 0
+     * $redis->set('x', '42');  // write 42 to x
+     * $redis->move('x', 1);    // move to DB 1
+     * $redis->select(1);       // switch to DB 1
+     * $redis->get('x');        // will return 42
+     * 
+ */ + public function move($key, $dbIndex) + { + } + + /** + * Renames a key + * + * @param string $srcKey + * @param string $dstKey + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/rename + * @example + *
+     * $redis->set('x', '42');
+     * $redis->rename('x', 'y');
+     * $redis->get('y');   // → 42
+     * $redis->get('x');   // → `FALSE`
+     * 
+ */ + public function rename($srcKey, $dstKey) + { + } + + /** + * @see rename() + * @link https://redis.io/commands/rename + * @deprecated use Redis::rename() + * + * @param string $srcKey + * @param string $dstKey + */ + public function renameKey($srcKey, $dstKey) + { + } + + /** + * Renames a key + * + * Same as rename, but will not replace a key if the destination already exists. + * This is the same behaviour as setNx. + * + * @param string $srcKey + * @param string $dstKey + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/renamenx + * @example + *
+     * $redis->set('x', '42');
+     * $redis->rename('x', 'y');
+     * $redis->get('y');   // → 42
+     * $redis->get('x');   // → `FALSE`
+     * 
+ */ + public function renameNx($srcKey, $dstKey) + { + } + + /** + * Sets an expiration date (a timeout) on an item + * + * @param string $key The key that will disappear + * @param int $ttl The key's remaining Time To Live, in seconds + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/expire + * @example + *
+     * $redis->set('x', '42');
+     * $redis->expire('x', 3);  // x will disappear in 3 seconds.
+     * sleep(5);                    // wait 5 seconds
+     * $redis->get('x');            // will return `FALSE`, as 'x' has expired.
+     * 
+ */ + public function expire($key, $ttl) + { + } + + /** + * Sets an expiration date (a timeout in milliseconds) on an item + * + * @param string $key The key that will disappear. + * @param int $ttl The key's remaining Time To Live, in milliseconds + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/pexpire + * @example + *
+     * $redis->set('x', '42');
+     * $redis->pExpire('x', 11500); // x will disappear in 11500 milliseconds.
+     * $redis->ttl('x');            // 12
+     * $redis->pttl('x');           // 11500
+     * 
+ */ + public function pExpire($key, $ttl) + { + } + + /** + * @see expire() + * @link https://redis.io/commands/expire + * @deprecated use Redis::expire() + * + * @param string $key + * @param int $ttl + * @return bool + */ + public function setTimeout($key, $ttl) + { + } + + /** + * Sets an expiration date (a timestamp) on an item. + * + * @param string $key The key that will disappear. + * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time. + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/expireat + * @example + *
+     * $redis->set('x', '42');
+     * $now = time(NULL);               // current timestamp
+     * $redis->expireAt('x', $now + 3); // x will disappear in 3 seconds.
+     * sleep(5);                        // wait 5 seconds
+     * $redis->get('x');                // will return `FALSE`, as 'x' has expired.
+     * 
+ */ + public function expireAt($key, $timestamp) + { + } + + /** + * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds + * + * @param string $key The key that will disappear + * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/pexpireat + * @example + *
+     * $redis->set('x', '42');
+     * $redis->pExpireAt('x', 1555555555005);
+     * echo $redis->ttl('x');                       // 218270121
+     * echo $redis->pttl('x');                      // 218270120575
+     * 
+ */ + public function pExpireAt($key, $timestamp) + { + } + + /** + * Returns the keys that match a certain pattern. + * + * @param string $pattern pattern, using '*' as a wildcard + * + * @return array string[] The keys that match a certain pattern. + * + * @link https://redis.io/commands/keys + * @example + *
+     * $allKeys = $redis->keys('*');   // all keys will match this.
+     * $keyWithUserPrefix = $redis->keys('user*');
+     * 
+ */ + public function keys($pattern) + { + } + + /** + * @see keys() + * @deprecated use Redis::keys() + * + * @param string $pattern + * @link https://redis.io/commands/keys + */ + public function getKeys($pattern) + { + } + + /** + * Returns the current database's size + * + * @return int DB size, in number of keys + * + * @link https://redis.io/commands/dbsize + * @example + *
+     * $count = $redis->dbSize();
+     * echo "Redis has $count keys\n";
+     * 
+ */ + public function dbSize() + { + } + + /** + * Authenticate the connection using a password. + * Warning: The password is sent in plain-text over the network. + * + * @param string $password + * + * @return bool TRUE if the connection is authenticated, FALSE otherwise + * + * @link https://redis.io/commands/auth + * @example $redis->auth('foobared'); + */ + public function auth($password) + { + } + + /** + * Starts the background rewrite of AOF (Append-Only File) + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/bgrewriteaof + * @example $redis->bgrewriteaof(); + */ + public function bgrewriteaof() + { + } + + /** + * Changes the slave status + * Either host and port, or no parameter to stop being a slave. + * + * @param string $host [optional] + * @param int $port [optional] + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/slaveof + * @example + *
+     * $redis->slaveof('10.0.1.7', 6379);
+     * // ...
+     * $redis->slaveof();
+     * 
+ */ + public function slaveof($host = '127.0.0.1', $port = 6379) + { + } + + /** + * Access the Redis slowLog + * + * @param string $operation This can be either GET, LEN, or RESET + * @param int|null $length If executing a SLOWLOG GET command, you can pass an optional length. + * + * @return mixed The return value of SLOWLOG will depend on which operation was performed. + * - SLOWLOG GET: Array of slowLog entries, as provided by Redis + * - SLOGLOG LEN: Integer, the length of the slowLog + * - SLOWLOG RESET: Boolean, depending on success + * + * @example + *
+     * // Get ten slowLog entries
+     * $redis->slowLog('get', 10);
+     * // Get the default number of slowLog entries
+     *
+     * $redis->slowLog('get');
+     * // Reset our slowLog
+     * $redis->slowLog('reset');
+     *
+     * // Retrieve slowLog length
+     * $redis->slowLog('len');
+     * 
+ * + * @link https://redis.io/commands/slowlog + */ + public function slowLog(string $operation, int $length = null) + { + } + + + /** + * Describes the object pointed to by a key. + * The information to retrieve (string) and the key (string). + * Info can be one of the following: + * - "encoding" + * - "refcount" + * - "idletime" + * + * @param string $string + * @param string $key + * + * @return string|int|bool for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist. + * + * @link https://redis.io/commands/object + * @example + *
+     * $redis->lPush('l', 'Hello, world!');
+     * $redis->object("encoding", "l"); // → ziplist
+     * $redis->object("refcount", "l"); // → 1
+     * $redis->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds).
+     * 
+ */ + public function object($string = '', $key = '') + { + } + + /** + * Performs a synchronous save. + * + * @return bool TRUE in case of success, FALSE in case of failure + * If a save is already running, this command will fail and return FALSE. + * + * @link https://redis.io/commands/save + * @example $redis->save(); + */ + public function save() + { + } + + /** + * Performs a background save. + * + * @return bool TRUE in case of success, FALSE in case of failure + * If a save is already running, this command will fail and return FALSE + * + * @link https://redis.io/commands/bgsave + * @example $redis->bgSave(); + */ + public function bgsave() + { + } + + /** + * Returns the timestamp of the last disk save. + * + * @return int timestamp + * + * @link https://redis.io/commands/lastsave + * @example $redis->lastSave(); + */ + public function lastSave() + { + } + + /** + * Blocks the current client until all the previous write commands are successfully transferred and + * acknowledged by at least the specified number of slaves. + * + * @param int $numSlaves Number of slaves that need to acknowledge previous write commands. + * @param int $timeout Timeout in milliseconds. + * + * @return int The command returns the number of slaves reached by all the writes performed in the + * context of the current connection + * + * @link https://redis.io/commands/wait + * @example $redis->wait(2, 1000); + */ + public function wait($numSlaves, $timeout) + { + } + + /** + * Returns the type of data pointed by a given key. + * + * @param string $key + * + * @return int + * Depending on the type of the data pointed by the key, + * this method will return the following value: + * - string: Redis::REDIS_STRING + * - set: Redis::REDIS_SET + * - list: Redis::REDIS_LIST + * - zset: Redis::REDIS_ZSET + * - hash: Redis::REDIS_HASH + * - other: Redis::REDIS_NOT_FOUND + * + * @link https://redis.io/commands/type + * @example $redis->type('key'); + */ + public function type($key) + { + } + + /** + * Append specified string to the string stored in specified key. + * + * @param string $key + * @param string|mixed $value + * + * @return int Size of the value after the append + * + * @link https://redis.io/commands/append + * @example + *
+     * $redis->set('key', 'value1');
+     * $redis->append('key', 'value2'); // 12
+     * $redis->get('key');              // 'value1value2'
+     * 
+ */ + public function append($key, $value) + { + } + + /** + * Return a substring of a larger string + * + * @param string $key + * @param int $start + * @param int $end + * + * @return string the substring + * + * @link https://redis.io/commands/getrange + * @example + *
+     * $redis->set('key', 'string value');
+     * $redis->getRange('key', 0, 5);   // 'string'
+     * $redis->getRange('key', -5, -1); // 'value'
+     * 
+ */ + public function getRange($key, $start, $end) + { + } + + /** + * Return a substring of a larger string + * + * @deprecated + * @param string $key + * @param int $start + * @param int $end + */ + public function substr($key, $start, $end) + { + } + + /** + * Changes a substring of a larger string. + * + * @param string $key + * @param int $offset + * @param string $value + * + * @return int the length of the string after it was modified + * + * @link https://redis.io/commands/setrange + * @example + *
+     * $redis->set('key', 'Hello world');
+     * $redis->setRange('key', 6, "redis"); // returns 11
+     * $redis->get('key');                  // "Hello redis"
+     * 
+ */ + public function setRange($key, $offset, $value) + { + } + + /** + * Get the length of a string value. + * + * @param string $key + * @return int + * + * @link https://redis.io/commands/strlen + * @example + *
+     * $redis->set('key', 'value');
+     * $redis->strlen('key'); // 5
+     * 
+ */ + public function strlen($key) + { + } + + /** + * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the + * string as an array of bits from left to right, where the first byte's most significant bit is at position 0, + * the second byte's most significant bit is at position 8, and so forth. + * + * @param string $key + * @param int $bit + * @param int $start + * @param int $end + * + * @return int The command returns the position of the first bit set to 1 or 0 according to the request. + * If we look for set bits (the bit argument is 1) and the string is empty or composed of just + * zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string + * only contains bit set to 1, the function returns the first bit not part of the string on the + * right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will + * return 24, since up to bit 23 all the bits are 1. Basically, the function considers the right + * of the string as padded with zeros if you look for clear bits and specify no range or the + * start argument only. However, this behavior changes if you are looking for clear bits and + * specify a range with both start and end. If no clear bit is found in the specified range, the + * function returns -1 as the user specified a clear range and there are no 0 bits in that range. + * + * @link https://redis.io/commands/bitpos + * @example + *
+     * $redis->set('key', '\xff\xff');
+     * $redis->bitpos('key', 1); // int(0)
+     * $redis->bitpos('key', 1, 1); // int(8)
+     * $redis->bitpos('key', 1, 3); // int(-1)
+     * $redis->bitpos('key', 0); // int(16)
+     * $redis->bitpos('key', 0, 1); // int(16)
+     * $redis->bitpos('key', 0, 1, 5); // int(-1)
+     * 
+ */ + public function bitpos($key, $bit, $start = 0, $end = null) + { + } + + /** + * Return a single bit out of a larger string + * + * @param string $key + * @param int $offset + * + * @return int the bit value (0 or 1) + * + * @link https://redis.io/commands/getbit + * @example + *
+     * $redis->set('key', "\x7f");  // this is 0111 1111
+     * $redis->getBit('key', 0);    // 0
+     * $redis->getBit('key', 1);    // 1
+     * 
+ */ + public function getBit($key, $offset) + { + } + + /** + * Changes a single bit of a string. + * + * @param string $key + * @param int $offset + * @param bool|int $value bool or int (1 or 0) + * + * @return int 0 or 1, the value of the bit before it was set + * + * @link https://redis.io/commands/setbit + * @example + *
+     * $redis->set('key', "*");     // ord("*") = 42 = 0x2f = "0010 1010"
+     * $redis->setBit('key', 5, 1); // returns 0
+     * $redis->setBit('key', 7, 1); // returns 0
+     * $redis->get('key');          // chr(0x2f) = "/" = b("0010 1111")
+     * 
+ */ + public function setBit($key, $offset, $value) + { + } + + /** + * Count bits in a string + * + * @param string $key + * + * @return int The number of bits set to 1 in the value behind the input key + * + * @link https://redis.io/commands/bitcount + * @example + *
+     * $redis->set('bit', '345'); // // 11 0011  0011 0100  0011 0101
+     * var_dump( $redis->bitCount('bit', 0, 0) ); // int(4)
+     * var_dump( $redis->bitCount('bit', 1, 1) ); // int(3)
+     * var_dump( $redis->bitCount('bit', 2, 2) ); // int(4)
+     * var_dump( $redis->bitCount('bit', 0, 2) ); // int(11)
+     * 
+ */ + public function bitCount($key) + { + } + + /** + * Bitwise operation on multiple keys. + * + * @param string $operation either "AND", "OR", "NOT", "XOR" + * @param string $retKey return key + * @param string $key1 first key + * @param string ...$otherKeys variadic list of keys + * + * @return int The size of the string stored in the destination key + * + * @link https://redis.io/commands/bitop + * @example + *
+     * $redis->set('bit1', '1'); // 11 0001
+     * $redis->set('bit2', '2'); // 11 0010
+     *
+     * $redis->bitOp('AND', 'bit', 'bit1', 'bit2'); // bit = 110000
+     * $redis->bitOp('OR',  'bit', 'bit1', 'bit2'); // bit = 110011
+     * $redis->bitOp('NOT', 'bit', 'bit1', 'bit2'); // bit = 110011
+     * $redis->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11
+     * 
+ */ + public function bitOp($operation, $retKey, $key1, ...$otherKeys) + { + } + + /** + * Removes all entries from the current database. + * + * @return bool Always TRUE + * @link https://redis.io/commands/flushdb + * @example $redis->flushDB(); + */ + public function flushDB() + { + } + + /** + * Removes all entries from all databases. + * + * @return bool Always TRUE + * + * @link https://redis.io/commands/flushall + * @example $redis->flushAll(); + */ + public function flushAll() + { + } + + /** + * Sort + * + * @param string $key + * @param array $option array(key => value, ...) - optional, with the following keys and values: + * - 'by' => 'some_pattern_*', + * - 'limit' => array(0, 1), + * - 'get' => 'some_other_pattern_*' or an array of patterns, + * - 'sort' => 'asc' or 'desc', + * - 'alpha' => TRUE, + * - 'store' => 'external-key' + * + * @return array + * An array of values, or a number corresponding to the number of elements stored if that was used + * + * @link https://redis.io/commands/sort + * @example + *
+     * $redis->del('s');
+     * $redis->sadd('s', 5);
+     * $redis->sadd('s', 4);
+     * $redis->sadd('s', 2);
+     * $redis->sadd('s', 1);
+     * $redis->sadd('s', 3);
+     *
+     * var_dump($redis->sort('s')); // 1,2,3,4,5
+     * var_dump($redis->sort('s', array('sort' => 'desc'))); // 5,4,3,2,1
+     * var_dump($redis->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5
+     * 
+ */ + public function sort($key, $option = null) + { + } + + /** + * Returns an associative array of strings and integers + * + * @param string $option Optional. The option to provide redis. + * SERVER | CLIENTS | MEMORY | PERSISTENCE | STATS | REPLICATION | CPU | CLASTER | KEYSPACE | COMANDSTATS + * + * Returns an associative array of strings and integers, with the following keys: + * - redis_version + * - redis_git_sha1 + * - redis_git_dirty + * - arch_bits + * - multiplexing_api + * - process_id + * - uptime_in_seconds + * - uptime_in_days + * - lru_clock + * - used_cpu_sys + * - used_cpu_user + * - used_cpu_sys_children + * - used_cpu_user_children + * - connected_clients + * - connected_slaves + * - client_longest_output_list + * - client_biggest_input_buf + * - blocked_clients + * - used_memory + * - used_memory_human + * - used_memory_peak + * - used_memory_peak_human + * - mem_fragmentation_ratio + * - mem_allocator + * - loading + * - aof_enabled + * - changes_since_last_save + * - bgsave_in_progress + * - last_save_time + * - total_connections_received + * - total_commands_processed + * - expired_keys + * - evicted_keys + * - keyspace_hits + * - keyspace_misses + * - hash_max_zipmap_entries + * - hash_max_zipmap_value + * - pubsub_channels + * - pubsub_patterns + * - latest_fork_usec + * - vm_enabled + * - role + * + * @return string + * + * @link https://redis.io/commands/info + * @example + *
+     * $redis->info();
+     *
+     * or
+     *
+     * $redis->info("COMMANDSTATS"); //Information on the commands that have been run (>=2.6 only)
+     * $redis->info("CPU"); // just CPU information from Redis INFO
+     * 
+ */ + public function info($option = null) + { + } + + /** + * Resets the statistics reported by Redis using the INFO command (`info()` function). + * These are the counters that are reset: + * - Keyspace hits + * - Keyspace misses + * - Number of commands processed + * - Number of connections received + * - Number of expired keys + * + * @return bool `TRUE` in case of success, `FALSE` in case of failure. + * + * @example $redis->resetStat(); + * @link https://redis.io/commands/config-resetstat + */ + public function resetStat() + { + } + + /** + * Returns the time to live left for a given key, in seconds. If the key doesn't exist, FALSE is returned. + * + * @param string $key + * + * @return int|bool the time left to live in seconds + * + * @link https://redis.io/commands/ttl + * @example + *
+     * $redis->setex('key', 123, 'test');
+     * $redis->ttl('key'); // int(123)
+     * 
+ */ + public function ttl($key) + { + } + + /** + * Returns a time to live left for a given key, in milliseconds. + * + * If the key doesn't exist, FALSE is returned. + * + * @param string $key + * + * @return int|bool the time left to live in milliseconds + * + * @link https://redis.io/commands/pttl + * @example + *
+     * $redis->setex('key', 123, 'test');
+     * $redis->pttl('key'); // int(122999)
+     * 
+ */ + public function pttl($key) + { + } + + /** + * Remove the expiration timer from a key. + * + * @param string $key + * + * @return bool TRUE if a timeout was removed, FALSE if the key didn’t exist or didn’t have an expiration timer. + * + * @link https://redis.io/commands/persist + * @example $redis->persist('key'); + */ + public function persist($key) + { + } + + /** + * Sets multiple key-value pairs in one atomic command. + * MSETNX only returns TRUE if all the keys were set (see SETNX). + * + * @param array $array Pairs: array(key => value, ...) + * + * @return bool TRUE in case of success, FALSE in case of failure + * + * @link https://redis.io/commands/mset + * @example + *
+     * $redis->mset(array('key0' => 'value0', 'key1' => 'value1'));
+     * var_dump($redis->get('key0'));
+     * var_dump($redis->get('key1'));
+     * // Output:
+     * // string(6) "value0"
+     * // string(6) "value1"
+     * 
+ */ + public function mset(array $array) + { + } + + /** + * Get the values of all the specified keys. + * If one or more keys dont exist, the array will contain FALSE at the position of the key. + * + * @param array $keys Array containing the list of the keys + * + * @return array Array containing the values related to keys in argument + * + * @deprecated use Redis::mGet() + * @example + *
+     * $redis->set('key1', 'value1');
+     * $redis->set('key2', 'value2');
+     * $redis->set('key3', 'value3');
+     * $redis->getMultiple(array('key1', 'key2', 'key3')); // array('value1', 'value2', 'value3');
+     * $redis->getMultiple(array('key0', 'key1', 'key5')); // array(`FALSE`, 'value2', `FALSE`);
+     * 
+ */ + public function getMultiple(array $keys) + { + } + + /** + * Returns the values of all specified keys. + * + * For every key that does not hold a string value or does not exist, + * the special value false is returned. Because of this, the operation never fails. + * + * @param array $array + * + * @return array + * + * @link https://redis.io/commands/mget + * @example + *
+     * $redis->del('x', 'y', 'z', 'h');  // remove x y z
+     * $redis->mset(array('x' => 'a', 'y' => 'b', 'z' => 'c'));
+     * $redis->hset('h', 'field', 'value');
+     * var_dump($redis->mget(array('x', 'y', 'z', 'h')));
+     * // Output:
+     * // array(3) {
+     * //   [0]=> string(1) "a"
+     * //   [1]=> string(1) "b"
+     * //   [2]=> string(1) "c"
+     * //   [3]=> bool(false)
+     * // }
+     * 
+ */ + public function mget(array $array) + { + } + + /** + * @see mset() + * @param array $array + * @return int 1 (if the keys were set) or 0 (no key was set) + * + * @link https://redis.io/commands/msetnx + */ + public function msetnx(array $array) + { + } + + /** + * Pops a value from the tail of a list, and pushes it to the front of another list. + * Also return this value. + * + * @since redis >= 1.1 + * + * @param string $srcKey + * @param string $dstKey + * + * @return string|mixed|bool The element that was moved in case of success, FALSE in case of failure. + * + * @link https://redis.io/commands/rpoplpush + * @example + *
+     * $redis->del('x', 'y');
+     *
+     * $redis->lPush('x', 'abc');
+     * $redis->lPush('x', 'def');
+     * $redis->lPush('y', '123');
+     * $redis->lPush('y', '456');
+     *
+     * // move the last of x to the front of y.
+     * var_dump($redis->rpoplpush('x', 'y'));
+     * var_dump($redis->lRange('x', 0, -1));
+     * var_dump($redis->lRange('y', 0, -1));
+     *
+     * //Output:
+     * //
+     * //string(3) "abc"
+     * //array(1) {
+     * //  [0]=>
+     * //  string(3) "def"
+     * //}
+     * //array(3) {
+     * //  [0]=>
+     * //  string(3) "abc"
+     * //  [1]=>
+     * //  string(3) "456"
+     * //  [2]=>
+     * //  string(3) "123"
+     * //}
+     * 
+ */ + public function rpoplpush($srcKey, $dstKey) + { + } + + /** + * A blocking version of rpoplpush, with an integral timeout in the third parameter. + * + * @param string $srcKey + * @param string $dstKey + * @param int $timeout + * + * @return string|mixed|bool The element that was moved in case of success, FALSE in case of timeout + * + * @link https://redis.io/commands/brpoplpush + */ + public function brpoplpush($srcKey, $dstKey, $timeout) + { + } + + /** + * Adds the specified member with a given score to the sorted set stored at key + * + * @param string $key Required key + * @param array|float $options Options if needed or score if omitted + * @param float|string|mixed $score1 Required score or value if options omitted + * @param string|float|mixed $value1 Required value or optional score if options omitted + * @param float|string|mixed $score2 Optional score or value if options omitted + * @param string|float|mixed $value2 Optional value or score if options omitted + * @param float|string|mixed $scoreN Optional score or value if options omitted + * @param string|float|mixed $valueN Optional value or score if options omitted + * + * @return int Number of values added + * + * @link https://redis.io/commands/zadd + * @example + *
+     * 
+     * $redis->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
+     * $redis->zRem('z', 'v2', 'v3');                           // int(2)
+     * $redis->zAdd('z', ['NX'], 5, 'v5');                      // int(1)
+     * $redis->zAdd('z', ['NX'], 6, 'v5');                      // int(0)
+     * $redis->zAdd('z', 7, 'v6');                              // int(1)
+     * $redis->zAdd('z', 8, 'v6');                              // int(0)
+     *
+     * var_dump( $redis->zRange('z', 0, -1) );
+     * // Output:
+     * // array(4) {
+     * //   [0]=> string(2) "v1"
+     * //   [1]=> string(2) "v4"
+     * //   [2]=> string(2) "v5"
+     * //   [3]=> string(2) "v8"
+     * // }
+     *
+     * var_dump( $redis->zRange('z', 0, -1, true) );
+     * // Output:
+     * // array(4) {
+     * //   ["v1"]=> float(1)
+     * //   ["v4"]=> float(4)
+     * //   ["v5"]=> float(5)
+     * //   ["v6"]=> float(8)
+     * 
+ *
+ */ + public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) + { + } + + /** + * Returns a range of elements from the ordered set stored at the specified key, + * with values in the range [start, end]. start and stop are interpreted as zero-based indices: + * 0 the first element, + * 1 the second ... + * -1 the last element, + * -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * @param bool $withscores + * + * @return array Array containing the values in specified range. + * + * @link https://redis.io/commands/zrange + * @example + *
+     * $redis->zAdd('key1', 0, 'val0');
+     * $redis->zAdd('key1', 2, 'val2');
+     * $redis->zAdd('key1', 10, 'val10');
+     * $redis->zRange('key1', 0, -1); // array('val0', 'val2', 'val10')
+     * // with scores
+     * $redis->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10)
+     * 
+ */ + public function zRange($key, $start, $end, $withscores = null) + { + } + + /** + * Deletes a specified member from the ordered set. + * + * @param string $key + * @param string|mixed $member1 + * @param string|mixed ...$otherMembers + * + * @return int Number of deleted values + * + * @link https://redis.io/commands/zrem + * @example + *
+     * $redis->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
+     * $redis->zRem('z', 'v2', 'v3');                           // int(2)
+     * var_dump( $redis->zRange('z', 0, -1) );
+     * //// Output:
+     * // array(2) {
+     * //   [0]=> string(2) "v1"
+     * //   [1]=> string(2) "v4"
+     * // }
+     * 
+ */ + public function zRem($key, $member1, ...$otherMembers) + { + } + + /** + * @see zRem() + * @link https://redis.io/commands/zrem + * @deprecated use Redis::zRem() + * + * @param string $key + * @param string|mixed $member1 + * @param string|mixed ...$otherMembers + * + * @return int Number of deleted values + */ + public function zDelete($key, $member1, ...$otherMembers) + { + } + + /** + * Returns the elements of the sorted set stored at the specified key in the range [start, end] + * in reverse order. start and stop are interpretated as zero-based indices: + * 0 the first element, + * 1 the second ... + * -1 the last element, + * -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * @param bool $withscore + * + * @return array Array containing the values in specified range. + * + * @link https://redis.io/commands/zrevrange + * @example + *
+     * $redis->zAdd('key', 0, 'val0');
+     * $redis->zAdd('key', 2, 'val2');
+     * $redis->zAdd('key', 10, 'val10');
+     * $redis->zRevRange('key', 0, -1); // array('val10', 'val2', 'val0')
+     *
+     * // with scores
+     * $redis->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0)
+     * 
+ */ + public function zRevRange($key, $start, $end, $withscore = null) + { + } + + /** + * Returns the elements of the sorted set stored at the specified key which have scores in the + * range [start,end]. Adding a parenthesis before start or end excludes it from the range. + * +inf and -inf are also valid limits. + * + * zRevRangeByScore returns the same items in reverse order, when the start and end parameters are swapped. + * + * @param string $key + * @param int $start + * @param int $end + * @param array $options Two options are available: + * - withscores => TRUE, + * - and limit => array($offset, $count) + * + * @return array Array containing the values in specified range. + * + * @link https://redis.io/commands/zrangebyscore + * @example + *
+     * $redis->zAdd('key', 0, 'val0');
+     * $redis->zAdd('key', 2, 'val2');
+     * $redis->zAdd('key', 10, 'val10');
+     * $redis->zRangeByScore('key', 0, 3);                                          // array('val0', 'val2')
+     * $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE);              // array('val0' => 0, 'val2' => 2)
+     * $redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));                        // array('val2')
+     * $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1));  // array('val2' => 2)
+     * 
+ */ + public function zRangeByScore($key, $start, $end, array $options = array()) + { + } + + /** + * @see zRangeByScore() + * @param string $key + * @param int $start + * @param int $end + * @param array $options + * + * @return array + */ + public function zRevRangeByScore($key, $start, $end, array $options = array()) + { + } + + /** + * Returns a lexigraphical range of members in a sorted set, assuming the members have the same score. The + * min and max values are required to start with '(' (exclusive), '[' (inclusive), or be exactly the values + * '-' (negative inf) or '+' (positive inf). The command must be called with either three *or* five + * arguments or will return FALSE. + * + * @param string $key The ZSET you wish to run against. + * @param int $min The minimum alphanumeric value you wish to get. + * @param int $max The maximum alphanumeric value you wish to get. + * @param int $offset Optional argument if you wish to start somewhere other than the first element. + * @param int $limit Optional argument if you wish to limit the number of elements returned. + * + * @return array|bool Array containing the values in the specified range. + * + * @link https://redis.io/commands/zrangebylex + * @example + *
+     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $char) {
+     *     $redis->zAdd('key', $char);
+     * }
+     *
+     * $redis->zRangeByLex('key', '-', '[c'); // array('a', 'b', 'c')
+     * $redis->zRangeByLex('key', '-', '(c'); // array('a', 'b')
+     * $redis->zRangeByLex('key', '-', '[c'); // array('b', 'c')
+     * 
+ */ + public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) + { + } + + /** + * @see zRangeByLex() + * @param string $key + * @param int $min + * @param int $max + * @param int $offset + * @param int $limit + * + * @return array + * + * @link https://redis.io/commands/zrevrangebylex + */ + public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) + { + } + + /** + * Returns the number of elements of the sorted set stored at the specified key which have + * scores in the range [start,end]. Adding a parenthesis before start or end excludes it + * from the range. +inf and -inf are also valid limits. + * + * @param string $key + * @param string $start + * @param string $end + * + * @return int the size of a corresponding zRangeByScore + * + * @link https://redis.io/commands/zcount + * @example + *
+     * $redis->zAdd('key', 0, 'val0');
+     * $redis->zAdd('key', 2, 'val2');
+     * $redis->zAdd('key', 10, 'val10');
+     * $redis->zCount('key', 0, 3); // 2, corresponding to array('val0', 'val2')
+     * 
+ */ + public function zCount($key, $start, $end) + { + } + + /** + * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end]. + * + * @param string $key + * @param float|string $start double or "+inf" or "-inf" string + * @param float|string $end double or "+inf" or "-inf" string + * + * @return int The number of values deleted from the sorted set + * + * @link https://redis.io/commands/zremrangebyscore + * @example + *
+     * $redis->zAdd('key', 0, 'val0');
+     * $redis->zAdd('key', 2, 'val2');
+     * $redis->zAdd('key', 10, 'val10');
+     * $redis->zRemRangeByScore('key', 0, 3); // 2
+     * 
+ */ + public function zRemRangeByScore($key, $start, $end) + { + } + + /** + * @see zRemRangeByScore() + * @deprecated use Redis::zRemRangeByScore() + * + * @param string $key + * @param float $start + * @param float $end + */ + public function zDeleteRangeByScore($key, $start, $end) + { + } + + /** + * Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end]. + * + * @param string $key + * @param int $start + * @param int $end + * + * @return int The number of values deleted from the sorted set + * + * @link https://redis.io/commands/zremrangebyrank + * @example + *
+     * $redis->zAdd('key', 1, 'one');
+     * $redis->zAdd('key', 2, 'two');
+     * $redis->zAdd('key', 3, 'three');
+     * $redis->zRemRangeByRank('key', 0, 1); // 2
+     * $redis->zRange('key', 0, -1, array('withscores' => TRUE)); // array('three' => 3)
+     * 
+ */ + public function zRemRangeByRank($key, $start, $end) + { + } + + /** + * @see zRemRangeByRank() + * @link https://redis.io/commands/zremrangebyscore + * @deprecated use Redis::zRemRangeByRank() + * + * @param string $key + * @param int $start + * @param int $end + */ + public function zDeleteRangeByRank($key, $start, $end) + { + } + + /** + * Returns the cardinality of an ordered set. + * + * @param string $key + * + * @return int the set's cardinality + * + * @link https://redis.io/commands/zsize + * @example + *
+     * $redis->zAdd('key', 0, 'val0');
+     * $redis->zAdd('key', 2, 'val2');
+     * $redis->zAdd('key', 10, 'val10');
+     * $redis->zCard('key');            // 3
+     * 
+ */ + public function zCard($key) + { + } + + /** + * @see zCard() + * @deprecated use Redis::zCard() + * + * @param string $key + * @return int + */ + public function zSize($key) + { + } + + /** + * Returns the score of a given member in the specified sorted set. + * + * @param string $key + * @param string|mixed $member + * + * @return float|bool false if member or key not exists + * + * @link https://redis.io/commands/zscore + * @example + *
+     * $redis->zAdd('key', 2.5, 'val2');
+     * $redis->zScore('key', 'val2'); // 2.5
+     * 
+ */ + public function zScore($key, $member) + { + } + + /** + * Returns the rank of a given member in the specified sorted set, starting at 0 for the item + * with the smallest score. zRevRank starts at 0 for the item with the largest score. + * + * @param string $key + * @param string|mixed $member + * + * @return int|bool the item's score, or false if key or member is not exists + * + * @link https://redis.io/commands/zrank + * @example + *
+     * $redis->del('z');
+     * $redis->zAdd('key', 1, 'one');
+     * $redis->zAdd('key', 2, 'two');
+     * $redis->zRank('key', 'one');     // 0
+     * $redis->zRank('key', 'two');     // 1
+     * $redis->zRevRank('key', 'one');  // 1
+     * $redis->zRevRank('key', 'two');  // 0
+     * 
+ */ + public function zRank($key, $member) + { + } + + /** + * @see zRank() + * @param string $key + * @param string|mixed $member + * + * @return int|bool the item's score, false - if key or member is not exists + * + * @link https://redis.io/commands/zrevrank + */ + public function zRevRank($key, $member) + { + } + + /** + * Increments the score of a member from a sorted set by a given amount. + * + * @param string $key + * @param float $value (double) value that will be added to the member's score + * @param string $member + * + * @return float the new value + * + * @link https://redis.io/commands/zincrby + * @example + *
+     * $redis->del('key');
+     * $redis->zIncrBy('key', 2.5, 'member1');  // key or member1 didn't exist, so member1's score is to 0
+     *                                          // before the increment and now has the value 2.5
+     * $redis->zIncrBy('key', 1, 'member1');    // 3.5
+     * 
+ */ + public function zIncrBy($key, $value, $member) + { + } + + /** + * Creates an union of sorted sets given in second argument. + * The result of the union will be stored in the sorted set defined by the first argument. + * The third optionnel argument defines weights to apply to the sorted sets in input. + * In this case, the weights will be multiplied by the score of each element in the sorted set + * before applying the aggregation. The forth argument defines the AGGREGATE option which + * specify how the results of the union are aggregated. + * + * @param string $output + * @param array $zSetKeys + * @param array $weights + * @param string $aggregateFunction Either "SUM", "MIN", or "MAX": defines the behaviour to use on + * duplicate entries during the zUnionStore + * + * @return int The number of values in the new sorted set + * + * @link https://redis.io/commands/zunionstore + * @example + *
+     * $redis->del('k1');
+     * $redis->del('k2');
+     * $redis->del('k3');
+     * $redis->del('ko1');
+     * $redis->del('ko2');
+     * $redis->del('ko3');
+     *
+     * $redis->zAdd('k1', 0, 'val0');
+     * $redis->zAdd('k1', 1, 'val1');
+     *
+     * $redis->zAdd('k2', 2, 'val2');
+     * $redis->zAdd('k2', 3, 'val3');
+     *
+     * $redis->zUnionStore('ko1', array('k1', 'k2')); // 4, 'ko1' => array('val0', 'val1', 'val2', 'val3')
+     *
+     * // Weighted zUnionStore
+     * $redis->zUnionStore('ko2', array('k1', 'k2'), array(1, 1)); // 4, 'ko2' => array('val0', 'val1', 'val2', 'val3')
+     * $redis->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3', 'val1')
+     * 
+ */ + public function zUnionStore($output, $zSetKeys, array $weights = null, $aggregateFunction = 'SUM') + { + } + + /** + * @see zUnionStore + * @deprecated use Redis::zUnionStore() + * + * @param string $Output + * @param array $ZSetKeys + * @param array|null $Weights + * @param string $aggregateFunction + */ + public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') + { + } + + /** + * Creates an intersection of sorted sets given in second argument. + * The result of the union will be stored in the sorted set defined by the first argument. + * The third optional argument defines weights to apply to the sorted sets in input. + * In this case, the weights will be multiplied by the score of each element in the sorted set + * before applying the aggregation. The forth argument defines the AGGREGATE option which + * specify how the results of the union are aggregated. + * + * @param string $output + * @param array $zSetKeys + * @param array $weights + * @param string $aggregateFunction Either "SUM", "MIN", or "MAX": + * defines the behaviour to use on duplicate entries during the zInterStore. + * + * @return int The number of values in the new sorted set. + * + * @link https://redis.io/commands/zinterstore + * @example + *
+     * $redis->del('k1');
+     * $redis->del('k2');
+     * $redis->del('k3');
+     *
+     * $redis->del('ko1');
+     * $redis->del('ko2');
+     * $redis->del('ko3');
+     * $redis->del('ko4');
+     *
+     * $redis->zAdd('k1', 0, 'val0');
+     * $redis->zAdd('k1', 1, 'val1');
+     * $redis->zAdd('k1', 3, 'val3');
+     *
+     * $redis->zAdd('k2', 2, 'val1');
+     * $redis->zAdd('k2', 3, 'val3');
+     *
+     * $redis->zInterStore('ko1', array('k1', 'k2'));               // 2, 'ko1' => array('val1', 'val3')
+     * $redis->zInterStore('ko2', array('k1', 'k2'), array(1, 1));  // 2, 'ko2' => array('val1', 'val3')
+     *
+     * // Weighted zInterStore
+     * $redis->zInterStore('ko3', array('k1', 'k2'), array(1, 5), 'min'); // 2, 'ko3' => array('val1', 'val3')
+     * $redis->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1')
+     * 
+ */ + public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = 'SUM') + { + } + + /** + * @see zInterStore + * @deprecated use Redis::zInterStore() + * + * @param $Output + * @param $ZSetKeys + * @param array|null $Weights + * @param string $aggregateFunction + */ + public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') + { + } + + /** + * Scan a sorted set for members, with optional pattern and count + * + * @param string $key String, the set to scan. + * @param int $iterator Long (reference), initialized to NULL. + * @param string $pattern String (optional), the pattern to match. + * @param int $count How many keys to return per iteration (Redis might return a different number). + * + * @return array|bool PHPRedis will return matching keys from Redis, or FALSE when iteration is complete + * + * @link https://redis.io/commands/zscan + * @example + *
+     * $iterator = null;
+     * while ($members = $redis-zscan('zset', $iterator)) {
+     *     foreach ($members as $member => $score) {
+     *         echo $member . ' => ' . $score . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function zScan($key, &$iterator, $pattern = null, $count = 0) + { + } + + /** + * Block until Redis can pop the highest or lowest scoring members from one or more ZSETs. + * There are two commands (BZPOPMIN and BZPOPMAX for popping the lowest and highest scoring elements respectively.) + * + * @param string|array $key1 + * @param string|array $key2 ... + * @param int $timeout + * + * @return array Either an array with the key member and score of the highest or lowest element or an empty array + * if the timeout was reached without an element to pop. + * + * @since >= 5.0 + * @link https://redis.io/commands/bzpopmax + * @example + *
+     * // Wait up to 5 seconds to pop the *lowest* scoring member from sets `zs1` and `zs2`.
+     * $redis->bzPopMin(['zs1', 'zs2'], 5);
+     * $redis->bzPopMin('zs1', 'zs2', 5);
+     *
+     * // Wait up to 5 seconds to pop the *highest* scoring member from sets `zs1` and `zs2`
+     * $redis->bzPopMax(['zs1', 'zs2'], 5);
+     * $redis->bzPopMax('zs1', 'zs2', 5);
+     * 
+ */ + public function bzPopMax($key1, $key2, $timeout) + { + } + + /** + * @param string|array $key1 + * @param string|array $key2 ... + * @param int $timeout + * + * @return array Either an array with the key member and score of the highest or lowest element or an empty array + * if the timeout was reached without an element to pop. + * + * @see bzPopMax + * @since >= 5.0 + * @link https://redis.io/commands/bzpopmin + */ + public function bzPopMin($key1, $key2, $timeout) + { + } + + /** + * Can pop the highest scoring members from one ZSET. + * + * @param string $key + * @param int $count + * + * @return array Either an array with the key member and score of the highest element or an empty array + * if there is no element to pop. + * + * @since >= 5.0 + * @link https://redis.io/commands/zpopmax + * @example + *
+     * // Pop the *lowest* scoring member from set `zs1`.
+     * $redis->zPopMax('zs1');
+     * // Pop the *lowest* 3 scoring member from set `zs1`.
+     * $redis->zPopMax('zs1', 3);
+     * 
+ */ + public function zPopMax($key, $count = 1) + { + } + + /** + * Can pop the lowest scoring members from one ZSET. + * + * @param string $key + * @param int $count + * + * @return array Either an array with the key member and score of the lowest element or an empty array + * if there is no element to pop. + * + * @since >= 5.0 + * @link https://redis.io/commands/zpopmin + * @example + *
+     * // Pop the *lowest* scoring member from set `zs1`.
+     * $redis->zPopMin('zs1');
+     * // Pop the *lowest* 3 scoring member from set `zs1`.
+     * $redis->zPopMin('zs1', 3);
+     * 
+ */ + public function zPopMin($key, $count = 1) + { + } + + /** + * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned. + * + * @param string $key + * @param string $hashKey + * @param string $value + * + * @return int|bool + * - 1 if value didn't exist and was added successfully, + * - 0 if the value was already present and was replaced, FALSE if there was an error. + * + * @link https://redis.io/commands/hset + * @example + *
+     * $redis->del('h')
+     * $redis->hSet('h', 'key1', 'hello');  // 1, 'key1' => 'hello' in the hash at "h"
+     * $redis->hGet('h', 'key1');           // returns "hello"
+     *
+     * $redis->hSet('h', 'key1', 'plop');   // 0, value was replaced.
+     * $redis->hGet('h', 'key1');           // returns "plop"
+     * 
+ */ + public function hSet($key, $hashKey, $value) + { + } + + /** + * Adds a value to the hash stored at key only if this field isn't already in the hash. + * + * @param string $key + * @param string $hashKey + * @param string $value + * + * @return bool TRUE if the field was set, FALSE if it was already present. + * + * @link https://redis.io/commands/hsetnx + * @example + *
+     * $redis->del('h')
+     * $redis->hSetNx('h', 'key1', 'hello'); // TRUE, 'key1' => 'hello' in the hash at "h"
+     * $redis->hSetNx('h', 'key1', 'world'); // FALSE, 'key1' => 'hello' in the hash at "h". No change since the field
+     * wasn't replaced.
+     * 
+ */ + public function hSetNx($key, $hashKey, $value) + { + } + + /** + * Gets a value from the hash stored at key. + * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned. + * + * @param string $key + * @param string $hashKey + * + * @return string The value, if the command executed successfully BOOL FALSE in case of failure + * + * @link https://redis.io/commands/hget + */ + public function hGet($key, $hashKey) + { + } + + /** + * Returns the length of a hash, in number of items + * + * @param string $key + * + * @return int|bool the number of items in a hash, FALSE if the key doesn't exist or isn't a hash + * + * @link https://redis.io/commands/hlen + * @example + *
+     * $redis->del('h')
+     * $redis->hSet('h', 'key1', 'hello');
+     * $redis->hSet('h', 'key2', 'plop');
+     * $redis->hLen('h'); // returns 2
+     * 
+ */ + public function hLen($key) + { + } + + /** + * Removes a values from the hash stored at key. + * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned. + * + * @param string $key + * @param string $hashKey1 + * @param string ...$otherHashKeys + * + * @return int|bool Number of deleted fields + * + * @link https://redis.io/commands/hdel + * @example + *
+     * $redis->hMSet('h',
+     *               array(
+     *                    'f1' => 'v1',
+     *                    'f2' => 'v2',
+     *                    'f3' => 'v3',
+     *                    'f4' => 'v4',
+     *               ));
+     *
+     * var_dump( $redis->hDel('h', 'f1') );        // int(1)
+     * var_dump( $redis->hDel('h', 'f2', 'f3') );  // int(2)
+     * s
+     * var_dump( $redis->hGetAll('h') );
+     * //// Output:
+     * //  array(1) {
+     * //    ["f4"]=> string(2) "v4"
+     * //  }
+     * 
+ */ + public function hDel($key, $hashKey1, ...$otherHashKeys) + { + } + + /** + * Returns the keys in a hash, as an array of strings. + * + * @param string $key + * + * @return array An array of elements, the keys of the hash. This works like PHP's array_keys(). + * + * @link https://redis.io/commands/hkeys + * @example + *
+     * $redis->del('h');
+     * $redis->hSet('h', 'a', 'x');
+     * $redis->hSet('h', 'b', 'y');
+     * $redis->hSet('h', 'c', 'z');
+     * $redis->hSet('h', 'd', 't');
+     * var_dump($redis->hKeys('h'));
+     *
+     * // Output:
+     * // array(4) {
+     * // [0]=>
+     * // string(1) "a"
+     * // [1]=>
+     * // string(1) "b"
+     * // [2]=>
+     * // string(1) "c"
+     * // [3]=>
+     * // string(1) "d"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hKeys($key) + { + } + + /** + * Returns the values in a hash, as an array of strings. + * + * @param string $key + * + * @return array An array of elements, the values of the hash. This works like PHP's array_values(). + * + * @link https://redis.io/commands/hvals + * @example + *
+     * $redis->del('h');
+     * $redis->hSet('h', 'a', 'x');
+     * $redis->hSet('h', 'b', 'y');
+     * $redis->hSet('h', 'c', 'z');
+     * $redis->hSet('h', 'd', 't');
+     * var_dump($redis->hVals('h'));
+     *
+     * // Output
+     * // array(4) {
+     * //   [0]=>
+     * //   string(1) "x"
+     * //   [1]=>
+     * //   string(1) "y"
+     * //   [2]=>
+     * //   string(1) "z"
+     * //   [3]=>
+     * //   string(1) "t"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hVals($key) + { + } + + /** + * Returns the whole hash, as an array of strings indexed by strings. + * + * @param string $key + * + * @return array An array of elements, the contents of the hash. + * + * @link https://redis.io/commands/hgetall + * @example + *
+     * $redis->del('h');
+     * $redis->hSet('h', 'a', 'x');
+     * $redis->hSet('h', 'b', 'y');
+     * $redis->hSet('h', 'c', 'z');
+     * $redis->hSet('h', 'd', 't');
+     * var_dump($redis->hGetAll('h'));
+     *
+     * // Output:
+     * // array(4) {
+     * //   ["a"]=>
+     * //   string(1) "x"
+     * //   ["b"]=>
+     * //   string(1) "y"
+     * //   ["c"]=>
+     * //   string(1) "z"
+     * //   ["d"]=>
+     * //   string(1) "t"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hGetAll($key) + { + } + + /** + * Verify if the specified member exists in a key. + * + * @param string $key + * @param string $hashKey + * + * @return bool If the member exists in the hash table, return TRUE, otherwise return FALSE. + * + * @link https://redis.io/commands/hexists + * @example + *
+     * $redis->hSet('h', 'a', 'x');
+     * $redis->hExists('h', 'a');               //  TRUE
+     * $redis->hExists('h', 'NonExistingKey');  // FALSE
+     * 
+ */ + public function hExists($key, $hashKey) + { + } + + /** + * Increments the value of a member from a hash by a given amount. + * + * @param string $key + * @param string $hashKey + * @param int $value (integer) value that will be added to the member's value + * + * @return int the new value + * + * @link https://redis.io/commands/hincrby + * @example + *
+     * $redis->del('h');
+     * $redis->hIncrBy('h', 'x', 2); // returns 2: h[x] = 2 now.
+     * $redis->hIncrBy('h', 'x', 1); // h[x] ← 2 + 1. Returns 3
+     * 
+ */ + public function hIncrBy($key, $hashKey, $value) + { + } + + /** + * Increment the float value of a hash field by the given amount + * + * @param string $key + * @param string $field + * @param float $increment + * + * @return float + * + * @link https://redis.io/commands/hincrbyfloat + * @example + *
+     * $redis = new Redis();
+     * $redis->connect('127.0.0.1');
+     * $redis->hset('h', 'float', 3);
+     * $redis->hset('h', 'int',   3);
+     * var_dump( $redis->hIncrByFloat('h', 'float', 1.5) ); // float(4.5)
+     *
+     * var_dump( $redis->hGetAll('h') );
+     *
+     * // Output
+     *  array(2) {
+     *    ["float"]=>
+     *    string(3) "4.5"
+     *    ["int"]=>
+     *    string(1) "3"
+     *  }
+     * 
+ */ + public function hIncrByFloat($key, $field, $increment) + { + } + + /** + * Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast. + * NULL values are stored as empty strings + * + * @param string $key + * @param array $hashKeys key → value array + * + * @return bool + * + * @link https://redis.io/commands/hmset + * @example + *
+     * $redis->del('user:1');
+     * $redis->hMSet('user:1', array('name' => 'Joe', 'salary' => 2000));
+     * $redis->hIncrBy('user:1', 'salary', 100); // Joe earns 100 more now.
+     * 
+ */ + public function hMSet($key, $hashKeys) + { + } + + /** + * Retirieve the values associated to the specified fields in the hash. + * + * @param string $key + * @param array $hashKeys + * + * @return array Array An array of elements, the values of the specified fields in the hash, + * with the hash keys as array keys. + * + * @link https://redis.io/commands/hmget + * @example + *
+     * $redis->del('h');
+     * $redis->hSet('h', 'field1', 'value1');
+     * $redis->hSet('h', 'field2', 'value2');
+     * $redis->hmGet('h', array('field1', 'field2')); // returns array('field1' => 'value1', 'field2' => 'value2')
+     * 
+ */ + public function hMGet($key, $hashKeys) + { + } + + /** + * Scan a HASH value for members, with an optional pattern and count. + * + * @param string $key + * @param int $iterator + * @param string $pattern Optional pattern to match against. + * @param int $count How many keys to return in a go (only a sugestion to Redis). + * + * @return array An array of members that match our pattern. + * + * @link https://redis.io/commands/hscan + * @example + *
+     * // $iterator = null;
+     * // while($elements = $redis->hscan('hash', $iterator)) {
+     * //     foreach($elements as $key => $value) {
+     * //         echo $key . ' => ' . $value . PHP_EOL;
+     * //     }
+     * // }
+     * 
+ */ + public function hScan($key, &$iterator, $pattern = null, $count = 0) + { + } + + /** + * Get the string length of the value associated with field in the hash stored at key + * + * @param string $key + * @param string $field + * + * @return int the string length of the value associated with field, or zero when field is not present in the hash + * or key does not exist at all. + * + * @link https://redis.io/commands/hstrlen + * @since >= 3.2 + */ + public function hStrLen(string $key, string $field) + { + } + + /** + * Add one or more geospatial items to the specified key. + * This function must be called with at least one longitude, latitude, member triplet. + * + * @param string $key + * @param float $longitude + * @param float $latitude + * @param string $member + * + * @return int The number of elements added to the geospatial key + * + * @link https://redis.io/commands/geoadd + * @since >=3.2 + * + * @example + *
+     * $redis->del("myplaces");
+     *
+     * // Since the key will be new, $result will be 2
+     * $result = $redis->geoAdd(
+     *   "myplaces",
+     *   -122.431, 37.773, "San Francisco",
+     *   -157.858, 21.315, "Honolulu"
+     * ); // 2
+     * 
+ */ + public function geoadd($key, $longitude, $latitude, $member) + { + } + + /** + * Retrieve Geohash strings for one or more elements of a geospatial index. + + * @param string $key + * @param string ...$member variadic list of members + * + * @return array One or more Redis Geohash encoded strings + * + * @link https://redis.io/commands/geohash + * @since >=3.2 + * + * @example + *
+     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
+     * $hashes = $redis->geoHash("hawaii", "Honolulu", "Maui");
+     * var_dump($hashes);
+     * // Output: array(2) {
+     * //   [0]=>
+     * //   string(11) "87z9pyek3y0"
+     * //   [1]=>
+     * //   string(11) "8e8y6d5jps0"
+     * // }
+     * 
+ */ + public function geohash($key, ...$member) + { + } + + /** + * Return longitude, latitude positions for each requested member. + * + * @param string $key + * @param string $member + * @return array One or more longitude/latitude positions + * + * @link https://redis.io/commands/geopos + * @since >=3.2 + * + * @example + *
+     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
+     * $positions = $redis->geoPos("hawaii", "Honolulu", "Maui");
+     * var_dump($positions);
+     *
+     * // Output:
+     * array(2) {
+     *  [0]=> array(2) {
+     *      [0]=> string(22) "-157.85800248384475708"
+     *      [1]=> string(19) "21.3060004581273077"
+     *  }
+     *  [1]=> array(2) {
+     *      [0]=> string(22) "-156.33099943399429321"
+     *      [1]=> string(20) "20.79799924753607598"
+     *  }
+     * }
+     * 
+ */ + public function geopos(string $key, string $member) + { + } + + /** + * Return the distance between two members in a geospatial set. + * + * If units are passed it must be one of the following values: + * - 'm' => Meters + * - 'km' => Kilometers + * - 'mi' => Miles + * - 'ft' => Feet + * + * @param string $key + * @param string $member1 + * @param string $member2 + * @param string|null $unit + * + * @return float The distance between the two passed members in the units requested (meters by default) + * + * @link https://redis.io/commands/geodist + * @since >=3.2 + * + * @example + *
+     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
+     *
+     * $meters = $redis->geoDist("hawaii", "Honolulu", "Maui");
+     * $kilometers = $redis->geoDist("hawaii", "Honolulu", "Maui", 'km');
+     * $miles = $redis->geoDist("hawaii", "Honolulu", "Maui", 'mi');
+     * $feet = $redis->geoDist("hawaii", "Honolulu", "Maui", 'ft');
+     *
+     * echo "Distance between Honolulu and Maui:\n";
+     * echo "  meters    : $meters\n";
+     * echo "  kilometers: $kilometers\n";
+     * echo "  miles     : $miles\n";
+     * echo "  feet      : $feet\n";
+     *
+     * // Bad unit
+     * $inches = $redis->geoDist("hawaii", "Honolulu", "Maui", 'in');
+     * echo "Invalid unit returned:\n";
+     * var_dump($inches);
+     *
+     * // Output
+     * Distance between Honolulu and Maui:
+     * meters    : 168275.204
+     * kilometers: 168.2752
+     * miles     : 104.5616
+     * feet      : 552084.0028
+     * Invalid unit returned:
+     * bool(false)
+     * 
+ */ + public function geodist($key, $member1, $member2, $unit = null) + { + } + + /** + * Return members of a set with geospatial information that are within the radius specified by the caller. + * + * @param $key + * @param $longitude + * @param $latitude + * @param $radius + * @param $unit + * @param array|null $options + *
+     * |Key         |Value          |Description                                        |
+     * |------------|---------------|---------------------------------------------------|
+     * |COUNT       |integer > 0    |Limit how many results are returned                |
+     * |            |WITHCOORD      |Return longitude and latitude of matching members  |
+     * |            |WITHDIST       |Return the distance from the center                |
+     * |            |WITHHASH       |Return the raw geohash-encoded score               |
+     * |            |ASC            |Sort results in ascending order                    |
+     * |            |DESC           |Sort results in descending order                   |
+     * |STORE       |key            |Store results in key                               |
+     * |STOREDIST   |key            |Store the results as distances in key              |
+     * 
+ * Note: It doesn't make sense to pass both ASC and DESC options but if both are passed + * the last one passed will be used. + * Note: When using STORE[DIST] in Redis Cluster, the store key must has to the same slot as + * the query key or you will get a CROSSLOT error. + * @return mixed When no STORE option is passed, this function returns an array of results. + * If it is passed this function returns the number of stored entries. + * + * @link https://redis.io/commands/georadius + * @since >= 3.2 + * @example + *
+     * // Add some cities
+     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
+     *
+     * echo "Within 300 miles of Honolulu:\n";
+     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi'));
+     *
+     * echo "\nWithin 300 miles of Honolulu with distances:\n";
+     * $options = ['WITHDIST'];
+     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
+     *
+     * echo "\nFirst result within 300 miles of Honolulu with distances:\n";
+     * $options['count'] = 1;
+     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
+     *
+     * echo "\nFirst result within 300 miles of Honolulu with distances in descending sort order:\n";
+     * $options[] = 'DESC';
+     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
+     *
+     * // Output
+     * Within 300 miles of Honolulu:
+     * array(2) {
+     *  [0]=> string(8) "Honolulu"
+     *  [1]=> string(4) "Maui"
+     * }
+     *
+     * Within 300 miles of Honolulu with distances:
+     * array(2) {
+     *     [0]=>
+     *   array(2) {
+     *         [0]=>
+     *     string(8) "Honolulu"
+     *         [1]=>
+     *     string(6) "0.0002"
+     *   }
+     *   [1]=>
+     *   array(2) {
+     *         [0]=>
+     *     string(4) "Maui"
+     *         [1]=>
+     *     string(8) "104.5615"
+     *   }
+     * }
+     *
+     * First result within 300 miles of Honolulu with distances:
+     * array(1) {
+     *     [0]=>
+     *   array(2) {
+     *         [0]=>
+     *     string(8) "Honolulu"
+     *         [1]=>
+     *     string(6) "0.0002"
+     *   }
+     * }
+     *
+     * First result within 300 miles of Honolulu with distances in descending sort order:
+     * array(1) {
+     *     [0]=>
+     *   array(2) {
+     *         [0]=>
+     *     string(4) "Maui"
+     *         [1]=>
+     *     string(8) "104.5615"
+     *   }
+     * }
+     * 
+ */ + public function georadius($key, $longitude, $latitude, $radius, $unit, array $options = null) + { + } + + /** + * This method is identical to geoRadius except that instead of passing a longitude and latitude as the "source" + * you pass an existing member in the geospatial set + * + * @param string $key + * @param string $member + * @param $radius + * @param $units + * @param array|null $options see georadius + * + * @return array The zero or more entries that are close enough to the member given the distance and radius specified + * + * @link https://redis.io/commands/georadiusbymember + * @since >= 3.2 + * @see georadius + * @example + *
+     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
+     *
+     * echo "Within 300 miles of Honolulu:\n";
+     * var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi'));
+     *
+     * echo "\nFirst match within 300 miles of Honolulu:\n";
+     * var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi', ['count' => 1]));
+     *
+     * // Output
+     * Within 300 miles of Honolulu:
+     * array(2) {
+     *  [0]=> string(8) "Honolulu"
+     *  [1]=> string(4) "Maui"
+     * }
+     *
+     * First match within 300 miles of Honolulu:
+     * array(1) {
+     *  [0]=> string(8) "Honolulu"
+     * }
+     * 
+ */ + public function georadiusbymember($key, $member, $radius, $units, array $options = null) + { + } + + /** + * Get or Set the redis config keys. + * + * @param string $operation either `GET` or `SET` + * @param string $key for `SET`, glob-pattern for `GET` + * @param string|mixed $value optional string (only for `SET`) + * + * @return array Associative array for `GET`, key -> value + * + * @link https://redis.io/commands/config-get + * @example + *
+     * $redis->config("GET", "*max-*-entries*");
+     * $redis->config("SET", "dir", "/var/run/redis/dumps/");
+     * 
+ */ + public function config($operation, $key, $value) + { + } + + /** + * Evaluate a LUA script serverside + * + * @param string $script + * @param array $args + * @param int $numKeys + * + * @return mixed What is returned depends on what the LUA script itself returns, which could be a scalar value + * (int/string), or an array. Arrays that are returned can also contain other arrays, if that's how it was set up in + * your LUA script. If there is an error executing the LUA script, the getLastError() function can tell you the + * message that came back from Redis (e.g. compile error). + * + * @link https://redis.io/commands/eval + * @example + *
+     * $redis->eval("return 1"); // Returns an integer: 1
+     * $redis->eval("return {1,2,3}"); // Returns Array(1,2,3)
+     * $redis->del('mylist');
+     * $redis->rpush('mylist','a');
+     * $redis->rpush('mylist','b');
+     * $redis->rpush('mylist','c');
+     * // Nested response:  Array(1,2,3,Array('a','b','c'));
+     * $redis->eval("return {1,2,3,redis.call('lrange','mylist',0,-1)}}");
+     * 
+ */ + public function eval($script, $args = array(), $numKeys = 0) + { + } + + /** + * @see eval() + * @deprecated use Redis::eval() + * + * @param string $script + * @param array $args + * @param int $numKeys + * @return mixed @see eval() + */ + public function evaluate($script, $args = array(), $numKeys = 0) + { + } + + /** + * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. + * In order to run this command Redis will have to have already loaded the script, either by running it or via + * the SCRIPT LOAD command. + * + * @param string $scriptSha + * @param array $args + * @param int $numKeys + * + * @return mixed @see eval() + * + * @see eval() + * @link https://redis.io/commands/evalsha + * @example + *
+     * $script = 'return 1';
+     * $sha = $redis->script('load', $script);
+     * $redis->evalSha($sha); // Returns 1
+     * 
+ */ + public function evalSha($scriptSha, $args = array(), $numKeys = 0) + { + } + + /** + * @see evalSha() + * @deprecated use Redis::evalSha() + * + * @param string $scriptSha + * @param array $args + * @param int $numKeys + */ + public function evaluateSha($scriptSha, $args = array(), $numKeys = 0) + { + } + + /** + * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem. + * @param string $command load | flush | kill | exists + * @param string $script + * + * @return mixed + * + * @link https://redis.io/commands/script-load + * @link https://redis.io/commands/script-kill + * @link https://redis.io/commands/script-flush + * @link https://redis.io/commands/script-exists + * @example + *
+     * $redis->script('load', $script);
+     * $redis->script('flush');
+     * $redis->script('kill');
+     * $redis->script('exists', $script1, [$script2, $script3, ...]);
+     * 
+ * + * SCRIPT LOAD will return the SHA1 hash of the passed script on success, and FALSE on failure. + * SCRIPT FLUSH should always return TRUE + * SCRIPT KILL will return true if a script was able to be killed and false if not + * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script + */ + public function script($command, $script) + { + } + + /** + * The last error message (if any) + * + * @return string|null A string with the last returned script based error message, or NULL if there is no error + * + * @example + *
+     * $redis->eval('this-is-not-lua');
+     * $err = $redis->getLastError();
+     * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'"
+     * 
+ */ + public function getLastError() + { + } + + /** + * Clear the last error message + * + * @return bool true + * + * @example + *
+     * $redis->set('x', 'a');
+     * $redis->incr('x');
+     * $err = $redis->getLastError();
+     * // "ERR value is not an integer or out of range"
+     * $redis->clearLastError();
+     * $err = $redis->getLastError();
+     * // NULL
+     * 
+ */ + public function clearLastError() + { + } + + /** + * Issue the CLIENT command with various arguments. + * The Redis CLIENT command can be used in four ways: + * - CLIENT LIST + * - CLIENT GETNAME + * - CLIENT SETNAME [name] + * - CLIENT KILL [ip:port] + * + * @param string $command + * @param string $value + * @return mixed This will vary depending on which client command was executed: + * - CLIENT LIST will return an array of arrays with client information. + * - CLIENT GETNAME will return the client name or false if none has been set + * - CLIENT SETNAME will return true if it can be set and false if not + * - CLIENT KILL will return true if the client can be killed, and false if not + * + * Note: phpredis will attempt to reconnect so you can actually kill your own connection but may not notice losing it! + * + * @link https://redis.io/commands/client-list + * @link https://redis.io/commands/client-getname + * @link https://redis.io/commands/client-setname + * @link https://redis.io/commands/client-kill + * + * @example + *
+     * $redis->client('list'); // Get a list of clients
+     * $redis->client('getname'); // Get the name of the current connection
+     * $redis->client('setname', 'somename'); // Set the name of the current connection
+     * $redis->client('kill', ); // Kill the process at ip:port
+     * 
+ */ + public function client($command, $value = '') + { + } + + /** + * A utility method to prefix the value with the prefix setting for phpredis. + * + * @param mixed $value The value you wish to prefix + * + * @return string If a prefix is set up, the value now prefixed. + * If there is no prefix, the value will be returned unchanged. + * + * @example + *
+     * $redis->setOption(Redis::OPT_PREFIX, 'my-prefix:');
+     * $redis->_prefix('my-value'); // Will return 'my-prefix:my-value'
+     * 
+ */ + public function _prefix($value) + { + } + + /** + * A utility method to unserialize data with whatever serializer is set up. If there is no serializer set, the + * value will be returned unchanged. If there is a serializer set up, and the data passed in is malformed, an + * exception will be thrown. This can be useful if phpredis is serializing values, and you return something from + * redis in a LUA script that is serialized. + * + * @param string $value The value to be unserialized + * + * @return mixed + * @example + *
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
+     * $redis->_unserialize('a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}'); // Will return Array(1,2,3)
+     * 
+ */ + public function _unserialize($value) + { + } + + /** + * A utility method to serialize values manually. This method allows you to serialize a value with whatever + * serializer is configured, manually. This can be useful for serialization/unserialization of data going in + * and out of EVAL commands as phpredis can't automatically do this itself. Note that if no serializer is + * set, phpredis will change Array values to 'Array', and Objects to 'Object'. + * + * @param mixed $value The value to be serialized. + * + * @return mixed + * @example + *
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);
+     * $redis->_serialize("foo"); // returns "foo"
+     * $redis->_serialize(Array()); // Returns "Array"
+     * $redis->_serialize(new stdClass()); // Returns "Object"
+     *
+     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
+     * $redis->_serialize("foo"); // Returns 's:3:"foo";'
+     * 
+ */ + public function _serialize($value) + { + } + + /** + * Dump a key out of a redis database, the value of which can later be passed into redis using the RESTORE command. + * The data that comes out of DUMP is a binary representation of the key as Redis stores it. + * @param string $key + * + * @return string|bool The Redis encoded value of the key, or FALSE if the key doesn't exist + * + * @link https://redis.io/commands/dump + * @example + *
+     * $redis->set('foo', 'bar');
+     * $val = $redis->dump('foo'); // $val will be the Redis encoded key value
+     * 
+ */ + public function dump($key) + { + } + + /** + * Restore a key from the result of a DUMP operation. + * + * @param string $key The key name + * @param int $ttl How long the key should live (if zero, no expire will be set on the key) + * @param string $value (binary). The Redis encoded key value (from DUMP) + * + * @return bool + * + * @link https://redis.io/commands/restore + * @example + *
+     * $redis->set('foo', 'bar');
+     * $val = $redis->dump('foo');
+     * $redis->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'
+     * 
+ */ + public function restore($key, $ttl, $value) + { + } + + /** + * Migrates a key to a different Redis instance. + * + * @param string $host The destination host + * @param int $port The TCP port to connect to. + * @param string $key The key to migrate. + * @param int $db The target DB. + * @param int $timeout The maximum amount of time given to this transfer. + * @param bool $copy Should we send the COPY flag to redis. + * @param bool $replace Should we send the REPLACE flag to redis. + * + * @return bool + * + * @link https://redis.io/commands/migrate + * @example + *
+     * $redis->migrate('backup', 6379, 'foo', 0, 3600);
+     * 
+ */ + public function migrate($host, $port, $key, $db, $timeout, $copy = false, $replace = false) + { + } + + /** + * Return the current Redis server time. + * + * @return array If successful, the time will come back as an associative array with element zero being the + * unix timestamp, and element one being microseconds. + * + * @link https://redis.io/commands/time + * @example + *
+     * var_dump( $redis->time() );
+     * // array(2) {
+     * //   [0] => string(10) "1342364352"
+     * //   [1] => string(6) "253002"
+     * // }
+     * 
+ */ + public function time() + { + } + + /** + * Scan the keyspace for keys + * + * @param int $iterator Iterator, initialized to NULL. + * @param string $pattern Pattern to match. + * @param int $count Count of keys per iteration (only a suggestion to Redis). + * + * @return array|bool This function will return an array of keys or FALSE if there are no more keys. + * + * @link https://redis.io/commands/scan + * @example + *
+     * $iterator = null;
+     * while(false !== ($keys = $redis->scan($iterator))) {
+     *     foreach($keys as $key) {
+     *         echo $key . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function scan(&$iterator, $pattern = null, $count = 0) + { + } + + /** + * Adds all the element arguments to the HyperLogLog data structure stored at the key. + * + * @param string $key + * @param array $elements + * + * @return bool + * + * @link https://redis.io/commands/pfadd + * @example $redis->pfAdd('key', array('elem1', 'elem2')) + */ + public function pfAdd($key, array $elements) + { + } + + /** + * When called with a single key, returns the approximated cardinality computed by the HyperLogLog data + * structure stored at the specified variable, which is 0 if the variable does not exist. + * + * @param string|array $key + * + * @return int + * + * @link https://redis.io/commands/pfcount + * @example + *
+     * $redis->pfAdd('key1', array('elem1', 'elem2'));
+     * $redis->pfAdd('key2', array('elem3', 'elem2'));
+     * $redis->pfCount('key1'); // int(2)
+     * $redis->pfCount(array('key1', 'key2')); // int(3)
+     */
+    public function pfCount($key)
+    {
+    }
+
+    /**
+     * Merge multiple HyperLogLog values into an unique value that will approximate the cardinality
+     * of the union of the observed Sets of the source HyperLogLog structures.
+     *
+     * @param string $destKey
+     * @param array  $sourceKeys
+     *
+     * @return bool
+     *
+     * @link    https://redis.io/commands/pfmerge
+     * @example
+     * 
+     * $redis->pfAdd('key1', array('elem1', 'elem2'));
+     * $redis->pfAdd('key2', array('elem3', 'elem2'));
+     * $redis->pfMerge('key3', array('key1', 'key2'));
+     * $redis->pfCount('key3'); // int(3)
+     */
+    public function pfMerge($destKey, array $sourceKeys)
+    {
+    }
+
+    /**
+     * Send arbitrary things to the redis server.
+     *
+     * @param string $command   Required command to send to the server.
+     * @param mixed  $arguments Optional variable amount of arguments to send to the server.
+     *
+     * @return mixed
+     *
+     * @example
+     * 
+     * $redis->rawCommand('SET', 'key', 'value'); // bool(true)
+     * $redis->rawCommand('GET", 'key'); // string(5) "value"
+     * 
+ */ + public function rawCommand($command, $arguments) + { + } + + /** + * Detect whether we're in ATOMIC/MULTI/PIPELINE mode. + * + * @return int Either Redis::ATOMIC, Redis::MULTI or Redis::PIPELINE + * + * @example $redis->getMode(); + */ + public function getMode() + { + } + + /** + * Acknowledge one or more messages on behalf of a consumer group. + * + * @param string $stream + * @param string $group + * @param array $messages + * + * @return int The number of messages Redis reports as acknowledged. + * + * @link https://redis.io/commands/xack + * @example + *
+     * $redis->xAck('stream', 'group1', ['1530063064286-0', '1530063064286-1']);
+     * 
+ */ + public function xAck($stream, $group, $messages) + { + } + + /** + * Add a message to a stream + * + * @param string $key + * @param string $id + * @param array $messages + * @param int $maxLen + * @param bool $isApproximate + * + * @return string The added message ID. + * + * @link https://redis.io/commands/xadd + * @example + *
+     * $redis->xAdd('mystream', "*", ['field' => 'value']);
+     * $redis->xAdd('mystream', "*", ['field' => 'value'], 10);
+     * $redis->xAdd('mystream', "*", ['field' => 'value'], 10, true);
+     * 
+ */ + public function xAdd($key, $id, $messages, $maxLen = 0, $isApproximate = false) + { + } + + /** + * Claim ownership of one or more pending messages + * + * @param string $key + * @param string $group + * @param string $consumer + * @param int $minIdleTime + * @param array $ids + * @param array $options ['IDLE' => $value, 'TIME' => $value, 'RETRYCOUNT' => $value, 'FORCE', 'JUSTID'] + * + * @return array Either an array of message IDs along with corresponding data, or just an array of IDs + * (if the 'JUSTID' option was passed). + * + * @link https://redis.io/commands/xclaim + * @example + *
+     * $ids = ['1530113681011-0', '1530113681011-1', '1530113681011-2'];
+     *
+     * // Without any options
+     * $redis->xClaim('mystream', 'group1', 'myconsumer1', 0, $ids);
+     *
+     * // With options
+     * $redis->xClaim(
+     *     'mystream', 'group1', 'myconsumer2', 0, $ids,
+     *     [
+     *         'IDLE' => time() * 1000,
+     *         'RETRYCOUNT' => 5,
+     *         'FORCE',
+     *         'JUSTID'
+     *     ]
+     * );
+     * 
+ */ + public function xClaim($key, $group, $consumer, $minIdleTime, $ids, $options = []) + { + } + + /** + * Delete one or more messages from a stream + * + * @param string $key + * @param array $ids + * + * @return int The number of messages removed + * + * @link https://redis.io/commands/xdel + * @example + *
+     * $redis->xDel('mystream', ['1530115304877-0', '1530115305731-0']);
+     * 
+ */ + public function xDel($key, $ids) + { + } + + /** + * @param string $operation e.g.: 'HELP', 'SETID', 'DELGROUP', 'CREATE', 'DELCONSUMER' + * @param string $key + * @param string $group + * @param string $msgId + * @param bool $mkStream + * + * @return mixed This command returns different types depending on the specific XGROUP command executed. + * + * @link https://redis.io/commands/xgroup + * @example + *
+     * $redis->xGroup('CREATE', 'mystream', 'mygroup', 0);
+     * $redis->xGroup('CREATE', 'mystream', 'mygroup', 0, true); // create stream
+     * $redis->xGroup('DESTROY', 'mystream', 'mygroup');
+     * 
+ */ + public function xGroup($operation, $key, $group, $msgId = '', $mkStream = false) + { + } + + /** + * Get information about a stream or consumer groups + * + * @param string $operation e.g.: 'CONSUMERS', 'GROUPS', 'STREAM', 'HELP' + * @param string $stream + * @param string $group + * + * @return mixed This command returns different types depending on which subcommand is used. + * + * @link https://redis.io/commands/xinfo + * @example + *
+     * $redis->xInfo('STREAM', 'mystream');
+     * 
+ */ + public function xInfo($operation, $stream, $group) + { + } + + /** + * Get the length of a given stream. + * + * @param string $stream + * + * @return int The number of messages in the stream. + * + * @link https://redis.io/commands/xlen + * @example + *
+     * $redis->xLen('mystream');
+     * 
+ */ + public function xLen($stream) + { + } + + /** + * Get information about pending messages in a given stream + * + * @param string $stream + * @param string $group + * @param string $start + * @param string $end + * @param int $count + * @param string $consumer + * + * @return array Information about the pending messages, in various forms depending on + * the specific invocation of XPENDING. + * + * @link https://redis.io/commands/xpending + * @example + *
+     * $redis->xPending('mystream', 'mygroup');
+     * $redis->xPending('mystream', 'mygroup', '-', '+', 1, 'consumer-1');
+     * 
+ */ + public function xPending($stream, $group, $start = null, $end = null, $count = null, $consumer = null) + { + } + + /** + * Get a range of messages from a given stream + * + * @param string $stream + * @param string $start + * @param string $end + * @param int $count + * + * @return array The messages in the stream within the requested range. + * + * @link https://redis.io/commands/xrange + * @example + *
+     * // Get everything in this stream
+     * $redis->xRange('mystream', '-', '+');
+     * // Only the first two messages
+     * $redis->xRange('mystream', '-', '+', 2);
+     * 
+ */ + public function xRange($stream, $start, $end, $count = null) + { + } + + /** + * Read data from one or more streams and only return IDs greater than sent in the command. + * + * @param array $streams + * @param int|string $count + * @param int|string $block + * + * @return array The messages in the stream newer than the IDs passed to Redis (if any) + * + * @link https://redis.io/commands/xread + * @example + *
+     * $redis->xRead(['stream1' => '1535222584555-0', 'stream2' => '1535222584555-0']);
+     * 
+ */ + public function xRead($streams, $count = null, $block = null) + { + } + + /** + * This method is similar to xRead except that it supports reading messages for a specific consumer group. + * + * @param string $group + * @param string $consumer + * @param array $streams + * @param int|null $count + * @param int|null $block + * + * @return array The messages delivered to this consumer group (if any). + * + * @link https://redis.io/commands/xreadgroup + * @example + *
+     * // Consume messages for 'mygroup', 'consumer1'
+     * $redis->xReadGroup('mygroup', 'consumer1', ['s1' => 0, 's2' => 0]);
+     * // Read a single message as 'consumer2' for up to a second until a message arrives.
+     * $redis->xReadGroup('mygroup', 'consumer2', ['s1' => 0, 's2' => 0], 1, 1000);
+     * 
+ */ + public function xReadGroup($group, $consumer, $streams, $count = null, $block = null) + { + } + + /** + * This is identical to xRange except the results come back in reverse order. + * Also note that Redis reverses the order of "start" and "end". + * + * @param string $stream + * @param string $end + * @param string $start + * @param int $count + * + * @return array The messages in the range specified + * + * @link https://redis.io/commands/xrevrange + * @example + *
+     * $redis->xRevRange('mystream', '+', '-');
+     * 
+ */ + public function xRevRange($stream, $end, $start, $count = null) + { + } + + /** + * Trim the stream length to a given maximum. + * If the "approximate" flag is pasesed, Redis will use your size as a hint but only trim trees in whole nodes + * (this is more efficient) + * + * @param string $stream + * @param int $maxLen + * @param bool $isApproximate + * + * @return int The number of messages trimed from the stream. + * + * @link https://redis.io/commands/xtrim + * @example + *
+     * // Trim to exactly 100 messages
+     * $redis->xTrim('mystream', 100);
+     * // Let Redis approximate the trimming
+     * $redis->xTrim('mystream', 100, true);
+     * 
+ */ + public function xTrim($stream, $maxLen, $isApproximate) + { + } + + /** + * Adds a values to the set value stored at key. + * + * @param string $key Required key + * @param array $values Required values + * + * @return int|bool The number of elements added to the set. + * If this value is already in the set, FALSE is returned + * + * @link https://redis.io/commands/sadd + * @link https://github.com/phpredis/phpredis/commit/3491b188e0022f75b938738f7542603c7aae9077 + * @since phpredis 2.2.8 + * @example + *
+     * $redis->sAddArray('k', array('v1'));                // boolean
+     * $redis->sAddArray('k', array('v1', 'v2', 'v3'));    // boolean
+     * 
+ */ + public function sAddArray($key, array $values) + { + } +} + +class RedisException extends Exception +{ +} + +/** + * @mixin \Redis + */ +class RedisArray +{ + /** + * Constructor + * + * @param string|array $hosts Name of the redis array from redis.ini or array of hosts to construct the array with + * @param array $opts Array of options + * + * @link https://github.com/nicolasff/phpredis/blob/master/arrays.markdown + */ + public function __construct($hosts, array $opts = null) + { + } + + /** + * @return array list of hosts for the selected array + */ + public function _hosts() + { + } + + /** + * @return string the name of the function used to extract key parts during consistent hashing + */ + public function _function() + { + } + + /** + * @param string $key The key for which you want to lookup the host + * + * @return string the host to be used for a certain key + */ + public function _target($key) + { + } + + /** + * Use this function when a new node is added and keys need to be rehashed. + */ + public function _rehash() + { + } + + /** + * Returns an associative array of strings and integers, with the following keys: + * - redis_version + * - redis_git_sha1 + * - redis_git_dirty + * - redis_build_id + * - redis_mode + * - os + * - arch_bits + * - multiplexing_api + * - atomicvar_api + * - gcc_version + * - process_id + * - run_id + * - tcp_port + * - uptime_in_seconds + * - uptime_in_days + * - hz + * - lru_clock + * - executable + * - config_file + * - connected_clients + * - client_longest_output_list + * - client_biggest_input_buf + * - blocked_clients + * - used_memory + * - used_memory_human + * - used_memory_rss + * - used_memory_rss_human + * - used_memory_peak + * - used_memory_peak_human + * - used_memory_peak_perc + * - used_memory_peak + * - used_memory_overhead + * - used_memory_startup + * - used_memory_dataset + * - used_memory_dataset_perc + * - total_system_memory + * - total_system_memory_human + * - used_memory_lua + * - used_memory_lua_human + * - maxmemory + * - maxmemory_human + * - maxmemory_policy + * - mem_fragmentation_ratio + * - mem_allocator + * - active_defrag_running + * - lazyfree_pending_objects + * - mem_fragmentation_ratio + * - loading + * - rdb_changes_since_last_save + * - rdb_bgsave_in_progress + * - rdb_last_save_time + * - rdb_last_bgsave_status + * - rdb_last_bgsave_time_sec + * - rdb_current_bgsave_time_sec + * - rdb_last_cow_size + * - aof_enabled + * - aof_rewrite_in_progress + * - aof_rewrite_scheduled + * - aof_last_rewrite_time_sec + * - aof_current_rewrite_time_sec + * - aof_last_bgrewrite_status + * - aof_last_write_status + * - aof_last_cow_size + * - changes_since_last_save + * - aof_current_size + * - aof_base_size + * - aof_pending_rewrite + * - aof_buffer_length + * - aof_rewrite_buffer_length + * - aof_pending_bio_fsync + * - aof_delayed_fsync + * - loading_start_time + * - loading_total_bytes + * - loading_loaded_bytes + * - loading_loaded_perc + * - loading_eta_seconds + * - total_connections_received + * - total_commands_processed + * - instantaneous_ops_per_sec + * - total_net_input_bytes + * - total_net_output_bytes + * - instantaneous_input_kbps + * - instantaneous_output_kbps + * - rejected_connections + * - maxclients + * - sync_full + * - sync_partial_ok + * - sync_partial_err + * - expired_keys + * - evicted_keys + * - keyspace_hits + * - keyspace_misses + * - pubsub_channels + * - pubsub_patterns + * - latest_fork_usec + * - migrate_cached_sockets + * - slave_expires_tracked_keys + * - active_defrag_hits + * - active_defrag_misses + * - active_defrag_key_hits + * - active_defrag_key_misses + * - role + * - master_replid + * - master_replid2 + * - master_repl_offset + * - second_repl_offset + * - repl_backlog_active + * - repl_backlog_size + * - repl_backlog_first_byte_offset + * - repl_backlog_histlen + * - master_host + * - master_port + * - master_link_status + * - master_last_io_seconds_ago + * - master_sync_in_progress + * - slave_repl_offset + * - slave_priority + * - slave_read_only + * - master_sync_left_bytes + * - master_sync_last_io_seconds_ago + * - master_link_down_since_seconds + * - connected_slaves + * - min-slaves-to-write + * - min-replicas-to-write + * - min_slaves_good_slaves + * - used_cpu_sys + * - used_cpu_user + * - used_cpu_sys_children + * - used_cpu_user_children + * - cluster_enabled + * + * @link https://redis.io/commands/info + * @return array + * @example + *
+     * $redis->info();
+     * 
+ */ + public function info() { + } +} diff --git a/build/stubs/redis_cluster.php b/build/stubs/redis_cluster.php new file mode 100644 index 00000000000..5e14570f3bf --- /dev/null +++ b/build/stubs/redis_cluster.php @@ -0,0 +1,3563 @@ + + * @link https://github.com/zgb7mtr/phpredis_cluster_phpdoc + * + * @method mixed eval($script, $args = array(), $numKeys = 0) + * + */ +class RedisCluster { + const AFTER = 'after'; + const BEFORE = 'before'; + + /** + * Options + */ + const OPT_SERIALIZER = 1; + const OPT_PREFIX = 2; + const OPT_READ_TIMEOUT = 3; + const OPT_SCAN = 4; + const OPT_SLAVE_FAILOVER = 5; + + /** + * Cluster options + */ + const FAILOVER_NONE = 0; + const FAILOVER_ERROR = 1; + const FAILOVER_DISTRIBUTE = 2; + const FAILOVER_DISTRIBUTE_SLAVES = 3; + + /** + * SCAN options + */ + const SCAN_NORETRY = 0; + const SCAN_RETRY = 1; + + /** + * Serializers + */ + const SERIALIZER_NONE = 0; + const SERIALIZER_PHP = 1; + const SERIALIZER_IGBINARY = 2; + const SERIALIZER_MSGPACK = 3; + const SERIALIZER_JSON = 4; + + /** + * Multi + */ + const ATOMIC = 0; + const MULTI = 1; + const PIPELINE = 2; + + /** + * Type + */ + const REDIS_NOT_FOUND = 0; + const REDIS_STRING = 1; + const REDIS_SET = 2; + const REDIS_LIST = 3; + const REDIS_ZSET = 4; + const REDIS_HASH = 5; + + /** + * Creates a Redis Cluster client + * + * @param string|null $name + * @param array $seeds + * @param float $timeout + * @param float $readTimeout + * @param bool $persistent + * @param string|null $auth + * @throws RedisClusterException + * + * @example + *
+     * // Declaring a cluster with an array of seeds
+     * $redisCluster = new RedisCluster(null,['127.0.0.1:6379']);
+     *
+     * // Loading a cluster configuration by name
+     * // In order to load a named array, one must first define the seed nodes in redis.ini.
+     * // The following lines would define the cluster 'mycluster', and be loaded automatically by phpredis.
+     *
+     * // # In redis.ini
+     * // redis.clusters.seeds = "mycluster[]=localhost:7000&test[]=localhost:7001"
+     * // redis.clusters.timeout = "mycluster=5"
+     * // redis.clusters.read_timeout = "mycluster=10"
+     *
+     * //Then, this cluster can be loaded by doing the following
+     *
+     * $redisClusterPro = new RedisCluster('mycluster');
+     * $redisClusterDev = new RedisCluster('test');
+     * 
+ */ + public function __construct($name, $seeds, $timeout = null, $readTimeout = null, $persistent = false, $auth = null) { } + + /** + * Disconnects from the Redis instance, except when pconnect is used. + */ + public function close() { } + + /** + * Get the value related to the specified key + * + * @param string $key + * + * @return string|false If key didn't exist, FALSE is returned. Otherwise, the value related to this key is + * returned. + * + * @link https://redis.io/commands/get + * @example + *
+     * $redisCluster->get('key');
+     * 
+ */ + public function get($key) { } + + /** + * Set the string value in argument as value of the key. + * + * @since If you're using Redis >= 2.6.12, you can pass extended options as explained in example + * + * @param string $key + * @param string $value + * @param int|array $timeout If you pass an integer, phpredis will redirect to SETEX, and will try to use Redis + * >= 2.6.12 extended options if you pass an array with valid values. + * + * @return bool TRUE if the command is successful. + * + * @link https://redis.io/commands/set + * @example + *
+     * // Simple key -> value set
+     * $redisCluster->set('key', 'value');
+     *
+     * // Will redirect, and actually make an SETEX call
+     * $redisCluster->set('key','value', 10);
+     *
+     * // Will set the key, if it doesn't exist, with a ttl of 10 seconds
+     * $redisCluster->set('key', 'value', Array('nx', 'ex'=>10));
+     *
+     * // Will set a key, if it does exist, with a ttl of 1000 milliseconds
+     * $redisCluster->set('key', 'value', Array('xx', 'px'=>1000));
+     * 
+ */ + public function set($key, $value, $timeout = null) { } + + /** + * Returns the values of all specified keys. + * + * For every key that does not hold a string value or does not exist, + * the special value false is returned. Because of this, the operation never fails. + * + * @param array $array + * + * @return array + * + * @link https://redis.io/commands/mget + * @example + *
+     * $redisCluster->del('x', 'y', 'z', 'h');    // remove x y z
+     * $redisCluster->mset(array('x' => 'a', 'y' => 'b', 'z' => 'c'));
+     * $redisCluster->hset('h', 'field', 'value');
+     * var_dump($redisCluster->mget(array('x', 'y', 'z', 'h')));
+     * // Output:
+     * // array(3) {
+     * // [0]=>
+     * // string(1) "a"
+     * // [1]=>
+     * // string(1) "b"
+     * // [2]=>
+     * // string(1) "c"
+     * // [3]=>
+     * // bool(false)
+     * // }
+     * 
+ */ + public function mget(array $array) { } + + /** + * Sets multiple key-value pairs in one atomic command. + * MSETNX only returns TRUE if all the keys were set (see SETNX). + * + * @param array $array Pairs: array(key => value, ...) + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/mset + * @example + *
+     * $redisCluster->mset(array('key0' => 'value0', 'key1' => 'value1'));
+     * var_dump($redisCluster->get('key0'));
+     * var_dump($redisCluster->get('key1'));
+     * // Output:
+     * // string(6) "value0"
+     * // string(6) "value1"
+     * 
+ */ + public function mset(array $array) { } + + /** + * @see mset() + * + * @param array $array + * + * @return int 1 (if the keys were set) or 0 (no key was set) + * @link https://redis.io/commands/msetnx + */ + public function msetnx(array $array) { } + + /** + * Remove specified keys. + * + * @param int|string|array $key1 An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 + * ... keyN + * @param int|string ...$otherKeys + * + * @return int Number of keys deleted. + * @link https://redis.io/commands/del + * @example + *
+     * $redisCluster->set('key1', 'val1');
+     * $redisCluster->set('key2', 'val2');
+     * $redisCluster->set('key3', 'val3');
+     * $redisCluster->set('key4', 'val4');
+     * $redisCluster->del('key1', 'key2');          // return 2
+     * $redisCluster->del(array('key3', 'key4'));   // return 2
+     * 
+ */ + public function del($key1, ...$otherKeys) { } + + /** + * Set the string value in argument as value of the key, with a time to live. + * + * @param string $key + * @param int $ttl + * @param string $value + * + * @return bool TRUE if the command is successful. + * @link https://redis.io/commands/setex + * @example + *
+     * $redisCluster->setex('key', 3600, 'value'); // sets key → value, with 1h TTL.
+     * 
+ */ + public function setex($key, $ttl, $value) { } + + /** + * PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds + * instead of seconds. + * + * @param string $key + * @param int $ttl + * @param string $value + * + * @return bool TRUE if the command is successful. + * @link https://redis.io/commands/psetex + * @example + *
+     * $redisCluster->psetex('key', 1000, 'value'); // sets key → value, with 1s TTL.
+     * 
+ */ + public function psetex($key, $ttl, $value) { } + + /** + * Set the string value in argument as value of the key if the key doesn't already exist in the database. + * + * @param string $key + * @param string $value + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/setnx + * @example + *
+     * $redisCluster->setnx('key', 'value');   // return TRUE
+     * $redisCluster->setnx('key', 'value');   // return FALSE
+     * 
+ */ + public function setnx($key, $value) { } + + /** + * Sets a value and returns the previous entry at that key. + * + * @param string $key + * @param string $value + * + * @return string A string, the previous value located at this key. + * @link https://redis.io/commands/getset + * @example + *
+     * $redisCluster->set('x', '42');
+     * $exValue = $redisCluster->getSet('x', 'lol');   // return '42', replaces x by 'lol'
+     * $newValue = $redisCluster->get('x');            // return 'lol'
+     * 
+ */ + public function getSet($key, $value) { } + + /** + * Verify if the specified key exists. + * + * @param string $key + * + * @return bool If the key exists, return TRUE, otherwise return FALSE. + * @link https://redis.io/commands/exists + * @example + *
+     * $redisCluster->set('key', 'value');
+     * $redisCluster->exists('key');               //  TRUE
+     * $redisCluster->exists('NonExistingKey');    // FALSE
+     * 
+ */ + public function exists($key) { } + + /** + * Returns the keys that match a certain pattern. + * + * @param string $pattern pattern, using '*' as a wildcard. + * + * @return array of STRING: The keys that match a certain pattern. + * @link https://redis.io/commands/keys + * @example + *
+     * $allKeys = $redisCluster->keys('*');   // all keys will match this.
+     * $keyWithUserPrefix = $redisCluster->keys('user*');
+     * 
+ */ + public function keys($pattern) { } + + /** + * Returns the type of data pointed by a given key. + * + * @param string $key + * + * @return int + * + * Depending on the type of the data pointed by the key, + * this method will return the following value: + * - string: RedisCluster::REDIS_STRING + * - set: RedisCluster::REDIS_SET + * - list: RedisCluster::REDIS_LIST + * - zset: RedisCluster::REDIS_ZSET + * - hash: RedisCluster::REDIS_HASH + * - other: RedisCluster::REDIS_NOT_FOUND + * @link https://redis.io/commands/type + * @example $redisCluster->type('key'); + */ + public function type($key) { } + + /** + * Returns and removes the first element of the list. + * + * @param string $key + * + * @return string|false if command executed successfully BOOL FALSE in case of failure (empty list) + * @link https://redis.io/commands/lpop + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');
+     * var_dump( $redisCluster->lRange('key1', 0, -1) );
+     * // Output:
+     * // array(3) {
+     * //   [0]=> string(1) "A"
+     * //   [1]=> string(1) "B"
+     * //   [2]=> string(1) "C"
+     * // }
+     * $redisCluster->lPop('key1');
+     * var_dump( $redisCluster->lRange('key1', 0, -1) );
+     * // Output:
+     * // array(2) {
+     * //   [0]=> string(1) "B"
+     * //   [1]=> string(1) "C"
+     * // }
+     * 
+ */ + public function lPop($key) { } + + /** + * Returns and removes the last element of the list. + * + * @param string $key + * + * @return string|false if command executed successfully BOOL FALSE in case of failure (empty list) + * @link https://redis.io/commands/rpop + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');
+     * var_dump( $redisCluster->lRange('key1', 0, -1) );
+     * // Output:
+     * // array(3) {
+     * //   [0]=> string(1) "A"
+     * //   [1]=> string(1) "B"
+     * //   [2]=> string(1) "C"
+     * // }
+     * $redisCluster->rPop('key1');
+     * var_dump( $redisCluster->lRange('key1', 0, -1) );
+     * // Output:
+     * // array(2) {
+     * //   [0]=> string(1) "A"
+     * //   [1]=> string(1) "B"
+     * // }
+     * 
+ */ + public function rPop($key) { } + + /** + * Set the list at index with the new value. + * + * @param string $key + * @param int $index + * @param string $value + * + * @return bool TRUE if the new value is setted. FALSE if the index is out of range, or data type identified by key + * is not a list. + * @link https://redis.io/commands/lset + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redisCluster->lGet('key1', 0);     // 'A'
+     * $redisCluster->lSet('key1', 0, 'X');
+     * $redisCluster->lGet('key1', 0);     // 'X'
+     * 
+ */ + public function lSet($key, $index, $value) { } + + /** + * Removes and returns a random element from the set value at Key. + * + * @param string $key + * + * @return string "popped" value + * bool FALSE if set identified by key is empty or doesn't exist. + * @link https://redis.io/commands/spop + * @example + *
+     * $redisCluster->sAdd('key1' , 'set1');
+     * $redisCluster->sAdd('key1' , 'set2');
+     * $redisCluster->sAdd('key1' , 'set3');
+     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set3', 'set1', 'set2'}
+     * $redisCluster->sPop('key1');// 'set1'
+     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set3', 'set2'}
+     * $redisCluster->sPop('key1');// 'set3',
+     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set2'}
+     * 
+ */ + public function sPop($key) { } + + /** + * Adds the string values to the head (left) of the list. Creates the list if the key didn't exist. + * If the key exists and is not a list, FALSE is returned. + * + * @param string $key + * @param string $value1 String, value to push in key + * @param string $value2 Optional + * @param string $valueN Optional + * + * @return int|false The new length of the list in case of success, FALSE in case of Failure. + * @link https://redis.io/commands/lpush + * @example + *
+     * $redisCluster->lPush('l', 'v1', 'v2', 'v3', 'v4')   // int(4)
+     * var_dump( $redisCluster->lRange('l', 0, -1) );
+     * //// Output:
+     * // array(4) {
+     * //   [0]=> string(2) "v4"
+     * //   [1]=> string(2) "v3"
+     * //   [2]=> string(2) "v2"
+     * //   [3]=> string(2) "v1"
+     * // }
+     * 
+ */ + public function lPush($key, $value1, $value2 = null, $valueN = null) { } + + /** + * Adds the string values to the tail (right) of the list. Creates the list if the key didn't exist. + * If the key exists and is not a list, FALSE is returned. + * + * @param string $key + * @param string $value1 String, value to push in key + * @param string $value2 Optional + * @param string $valueN Optional + * + * @return int|false The new length of the list in case of success, FALSE in case of Failure. + * @link https://redis.io/commands/rpush + * @example + *
+     * $redisCluster->rPush('r', 'v1', 'v2', 'v3', 'v4');    // int(4)
+     * var_dump( $redisCluster->lRange('r', 0, -1) );
+     * //// Output:
+     * // array(4) {
+     * //   [0]=> string(2) "v1"
+     * //   [1]=> string(2) "v2"
+     * //   [2]=> string(2) "v3"
+     * //   [3]=> string(2) "v4"
+     * // }
+     * 
+ */ + public function rPush($key, $value1, $value2 = null, $valueN = null) { } + + /** + * BLPOP is a blocking list pop primitive. + * It is the blocking version of LPOP because it blocks the connection when + * there are no elements to pop from any of the given lists. + * An element is popped from the head of the first list that is non-empty, + * with the given keys being checked in the order that they are given. + * + * @param array $keys Array containing the keys of the lists + * Or STRING Key1 STRING Key2 STRING Key3 ... STRING Keyn + * @param int $timeout Timeout + * + * @return array array('listName', 'element') + * @link https://redis.io/commands/blpop + * @example + *
+     * // Non blocking feature
+     * $redisCluster->lPush('key1', 'A');
+     * $redisCluster->del('key2');
+     *
+     * $redisCluster->blPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redisCluster->blPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * $redisCluster->brPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redisCluster->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * // Blocking feature
+     *
+     * // process 1
+     * $redisCluster->del('key1');
+     * $redisCluster->blPop('key1', 10);
+     * // blocking for 10 seconds
+     *
+     * // process 2
+     * $redisCluster->lPush('key1', 'A');
+     *
+     * // process 1
+     * // array('key1', 'A') is returned
+     * 
+ */ + public function blPop(array $keys, $timeout) { } + + /** + * BRPOP is a blocking list pop primitive. + * It is the blocking version of RPOP because it blocks the connection when + * there are no elements to pop from any of the given lists. + * An element is popped from the tail of the first list that is non-empty, + * with the given keys being checked in the order that they are given. + * See the BLPOP documentation(https://redis.io/commands/blpop) for the exact semantics, + * since BRPOP is identical to BLPOP with the only difference being that + * it pops elements from the tail of a list instead of popping from the head. + * + * @param array $keys Array containing the keys of the lists + * Or STRING Key1 STRING Key2 STRING Key3 ... STRING Keyn + * @param int $timeout Timeout + * + * @return array array('listName', 'element') + * @link https://redis.io/commands/brpop + * @example + *
+     * // Non blocking feature
+     * $redisCluster->lPush('key1', 'A');
+     * $redisCluster->del('key2');
+     *
+     * $redisCluster->blPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redisCluster->blPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * $redisCluster->brPop('key1', 'key2', 10); // array('key1', 'A')
+     * // OR
+     * $redisCluster->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
+     *
+     * // Blocking feature
+     *
+     * // process 1
+     * $redisCluster->del('key1');
+     * $redisCluster->blPop('key1', 10);
+     * // blocking for 10 seconds
+     *
+     * // process 2
+     * $redisCluster->lPush('key1', 'A');
+     *
+     * // process 1
+     * // array('key1', 'A') is returned
+     * 
+ */ + public function brPop(array $keys, $timeout) { } + + /** + * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure. + * + * @param string $key + * @param string $value String, value to push in key + * + * @return int|false The new length of the list in case of success, FALSE in case of Failure. + * @link https://redis.io/commands/rpushx + * @example + *
+     * $redisCluster->del('key1');
+     * $redisCluster->rPushx('key1', 'A'); // returns 0
+     * $redisCluster->rPush('key1', 'A'); // returns 1
+     * $redisCluster->rPushx('key1', 'B'); // returns 2
+     * $redisCluster->rPushx('key1', 'C'); // returns 3
+     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
+     * 
+ */ + public function rPushx($key, $value) { } + + /** + * Adds the string value to the head (left) of the list if the list exists. + * + * @param string $key + * @param string $value String, value to push in key + * + * @return int|false The new length of the list in case of success, FALSE in case of Failure. + * @link https://redis.io/commands/lpushx + * @example + *
+     * $redisCluster->del('key1');
+     * $redisCluster->lPushx('key1', 'A');     // returns 0
+     * $redisCluster->lPush('key1', 'A');      // returns 1
+     * $redisCluster->lPushx('key1', 'B');     // returns 2
+     * $redisCluster->lPushx('key1', 'C');     // returns 3
+     * // key1 now points to the following list: [ 'C', 'B', 'A' ]
+     * 
+ */ + public function lPushx($key, $value) { } + + /** + * Insert value in the list before or after the pivot value. the parameter options + * specify the position of the insert (before or after). If the list didn't exists, + * or the pivot didn't exists, the value is not inserted. + * + * @param string $key + * @param int $position RedisCluster::BEFORE | RedisCluster::AFTER + * @param string $pivot + * @param string $value + * + * @return int The number of the elements in the list, -1 if the pivot didn't exists. + * @link https://redis.io/commands/linsert + * @example + *
+     * $redisCluster->del('key1');
+     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'A', 'X');    // 0
+     *
+     * $redisCluster->lPush('key1', 'A');
+     * $redisCluster->lPush('key1', 'B');
+     * $redisCluster->lPush('key1', 'C');
+     *
+     * $redisCluster->lInsert('key1', RedisCluster::BEFORE, 'C', 'X');   // 4
+     * $redisCluster->lRange('key1', 0, -1);                      // array('X', 'C', 'B', 'A')
+     *
+     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'C', 'Y');    // 5
+     * $redisCluster->lRange('key1', 0, -1);                      // array('X', 'C', 'Y', 'B', 'A')
+     *
+     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'W', 'value'); // -1
+     * 
+ */ + public function lInsert($key, $position, $pivot, $value) { } + + /** + * Return the specified element of the list stored at the specified key. + * 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ... + * Return FALSE in case of a bad index or a key that doesn't point to a list. + * + * @param string $key + * @param int $index + * + * @return string|false the element at this index + * Bool FALSE if the key identifies a non-string data type, or no value corresponds to this index in the list Key. + * @link https://redis.io/commands/lindex + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redisCluster->lGet('key1', 0);     // 'A'
+     * $redisCluster->lGet('key1', -1);    // 'C'
+     * $redisCluster->lGet('key1', 10);    // `FALSE`
+     * 
+ */ + public function lIndex($key, $index) { } + + /** + * Removes the first count occurrences of the value element from the list. + * If count is zero, all the matching elements are removed. If count is negative, + * elements are removed from tail to head. + * + * @param string $key + * @param string $value + * @param int $count + * + * @return int the number of elements to remove + * bool FALSE if the value identified by key is not a list. + * @link https://redis.io/commands/lrem + * @example + *
+     * $redisCluster->lPush('key1', 'A');
+     * $redisCluster->lPush('key1', 'B');
+     * $redisCluster->lPush('key1', 'C');
+     * $redisCluster->lPush('key1', 'A');
+     * $redisCluster->lPush('key1', 'A');
+     *
+     * $redisCluster->lRange('key1', 0, -1);   // array('A', 'A', 'C', 'B', 'A')
+     * $redisCluster->lRem('key1', 'A', 2);    // 2
+     * $redisCluster->lRange('key1', 0, -1);   // array('C', 'B', 'A')
+     * 
+ */ + public function lRem($key, $value, $count) { } + + /** + * A blocking version of rpoplpush, with an integral timeout in the third parameter. + * + * @param string $srcKey + * @param string $dstKey + * @param int $timeout + * + * @return string|false The element that was moved in case of success, FALSE in case of timeout. + * @link https://redis.io/commands/brpoplpush + */ + public function brpoplpush($srcKey, $dstKey, $timeout) { } + + /** + * Pops a value from the tail of a list, and pushes it to the front of another list. + * Also return this value. + * + * @since redis >= 1.2 + * + * @param string $srcKey + * @param string $dstKey + * + * @return string|false The element that was moved in case of success, FALSE in case of failure. + * @link https://redis.io/commands/rpoplpush + * @example + *
+     * $redisCluster->del('x', 'y');
+     *
+     * $redisCluster->lPush('x', 'abc');
+     * $redisCluster->lPush('x', 'def');
+     * $redisCluster->lPush('y', '123');
+     * $redisCluster->lPush('y', '456');
+     *
+     * // move the last of x to the front of y.
+     * var_dump($redisCluster->rpoplpush('x', 'y'));
+     * var_dump($redisCluster->lRange('x', 0, -1));
+     * var_dump($redisCluster->lRange('y', 0, -1));
+     *
+     * ////Output:
+     * //
+     * //string(3) "abc"
+     * //array(1) {
+     * //  [0]=>
+     * //  string(3) "def"
+     * //}
+     * //array(3) {
+     * //  [0]=>
+     * //  string(3) "abc"
+     * //  [1]=>
+     * //  string(3) "456"
+     * //  [2]=>
+     * //  string(3) "123"
+     * //}
+     * 
+ */ + public function rpoplpush($srcKey, $dstKey) { } + + /** + * Returns the size of a list identified by Key. If the list didn't exist or is empty, + * the command returns 0. If the data type identified by Key is not a list, the command return FALSE. + * + * @param string $key + * + * @return int The size of the list identified by Key exists. + * bool FALSE if the data type identified by Key is not list + * @link https://redis.io/commands/llen + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
+     * $redisCluster->lLen('key1');       // 3
+     * $redisCluster->rPop('key1');
+     * $redisCluster->lLen('key1');       // 2
+     * 
+ */ + public function lLen($key) { } + + /** + * Returns the set cardinality (number of elements) of the set stored at key. + * + * @param string $key + * + * @return int the cardinality (number of elements) of the set, or 0 if key does not exist. + * @link https://redis.io/commands/scard + * @example + *
+     * $redisCluster->sAdd('key1' , 'set1');
+     * $redisCluster->sAdd('key1' , 'set2');
+     * $redisCluster->sAdd('key1' , 'set3');   // 'key1' => {'set1', 'set2', 'set3'}
+     * $redisCluster->sCard('key1');           // 3
+     * $redisCluster->sCard('keyX');           // 0
+     * 
+ */ + public function sCard($key) { } + + /** + * Returns all the members of the set value stored at key. + * This has the same effect as running SINTER with one argument key. + * + * @param string $key + * + * @return array All elements of the set. + * @link https://redis.io/commands/smembers + * @example + *
+     * $redisCluster->del('s');
+     * $redisCluster->sAdd('s', 'a');
+     * $redisCluster->sAdd('s', 'b');
+     * $redisCluster->sAdd('s', 'a');
+     * $redisCluster->sAdd('s', 'c');
+     * var_dump($redisCluster->sMembers('s'));
+     *
+     * ////Output:
+     * //
+     * //array(3) {
+     * //  [0]=>
+     * //  string(1) "b"
+     * //  [1]=>
+     * //  string(1) "c"
+     * //  [2]=>
+     * //  string(1) "a"
+     * //}
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function sMembers($key) { } + + /** + * Returns if member is a member of the set stored at key. + * + * @param string $key + * @param string $value + * + * @return bool TRUE if value is a member of the set at key key, FALSE otherwise. + * @link https://redis.io/commands/sismember + * @example + *
+     * $redisCluster->sAdd('key1' , 'set1');
+     * $redisCluster->sAdd('key1' , 'set2');
+     * $redisCluster->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
+     *
+     * $redisCluster->sIsMember('key1', 'set1'); // TRUE
+     * $redisCluster->sIsMember('key1', 'setX'); // FALSE
+     * 
+ */ + public function sIsMember($key, $value) { } + + /** + * Adds a values to the set value stored at key. + * If this value is already in the set, FALSE is returned. + * + * @param string $key Required key + * @param string $value1 Required value + * @param string $value2 Optional value + * @param string $valueN Optional value + * + * @return int|false The number of elements added to the set + * @link https://redis.io/commands/sadd + * @example + *
+     * $redisCluster->sAdd('k', 'v1');                // int(1)
+     * $redisCluster->sAdd('k', 'v1', 'v2', 'v3');    // int(2)
+     * 
+ */ + public function sAdd($key, $value1, $value2 = null, $valueN = null) { } + + /** + * Adds a values to the set value stored at key. + * If this value is already in the set, FALSE is returned. + * + * @param string $key Required key + * @param array $valueArray + * + * @return int|false The number of elements added to the set + * @example + *
+     * $redisCluster->sAddArray('k', ['v1', 'v2', 'v3']);
+     * //This is a feature in php only. Same as $redisCluster->sAdd('k', 'v1', 'v2', 'v3');
+     * 
+ */ + public function sAddArray($key, array $valueArray) { } + + /** + * Removes the specified members from the set value stored at key. + * + * @param string $key + * @param string $member1 + * @param string $member2 + * @param string $memberN + * + * @return int The number of elements removed from the set. + * @link https://redis.io/commands/srem + * @example + *
+     * var_dump( $redisCluster->sAdd('k', 'v1', 'v2', 'v3') );    // int(3)
+     * var_dump( $redisCluster->sRem('k', 'v2', 'v3') );          // int(2)
+     * var_dump( $redisCluster->sMembers('k') );
+     * //// Output:
+     * // array(1) {
+     * //   [0]=> string(2) "v1"
+     * // }
+     * 
+ */ + public function sRem($key, $member1, $member2 = null, $memberN = null) { } + + /** + * Performs the union between N sets and returns it. + * + * @param string $key1 Any number of keys corresponding to sets in redis. + * @param string $key2 ... + * @param string $keyN ... + * + * @return array of strings: The union of all these sets. + * @link https://redis.io/commands/sunionstore + * @example + *
+     * $redisCluster->del('s0', 's1', 's2');
+     *
+     * $redisCluster->sAdd('s0', '1');
+     * $redisCluster->sAdd('s0', '2');
+     * $redisCluster->sAdd('s1', '3');
+     * $redisCluster->sAdd('s1', '1');
+     * $redisCluster->sAdd('s2', '3');
+     * $redisCluster->sAdd('s2', '4');
+     *
+     * var_dump($redisCluster->sUnion('s0', 's1', 's2'));
+     *
+     * //// Output:
+     * //
+     * //array(4) {
+     * //  [0]=>
+     * //  string(1) "3"
+     * //  [1]=>
+     * //  string(1) "4"
+     * //  [2]=>
+     * //  string(1) "1"
+     * //  [3]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sUnion($key1, $key2, $keyN = null) { } + + /** + * Performs the same action as sUnion, but stores the result in the first key + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 Any number of keys corresponding to sets in redis. + * @param string $key2 ... + * @param string $keyN ... + * + * @return int Any number of keys corresponding to sets in redis. + * @link https://redis.io/commands/sunionstore + * @example + *
+     * $redisCluster->del('s0', 's1', 's2');
+     *
+     * $redisCluster->sAdd('s0', '1');
+     * $redisCluster->sAdd('s0', '2');
+     * $redisCluster->sAdd('s1', '3');
+     * $redisCluster->sAdd('s1', '1');
+     * $redisCluster->sAdd('s2', '3');
+     * $redisCluster->sAdd('s2', '4');
+     *
+     * var_dump($redisCluster->sUnionStore('dst', 's0', 's1', 's2'));
+     * var_dump($redisCluster->sMembers('dst'));
+     *
+     * //// Output:
+     * //
+     * //int(4)
+     * //array(4) {
+     * //  [0]=>
+     * //  string(1) "3"
+     * //  [1]=>
+     * //  string(1) "4"
+     * //  [2]=>
+     * //  string(1) "1"
+     * //  [3]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sUnionStore($dstKey, $key1, $key2, $keyN = null) { } + + /** + * Returns the members of a set resulting from the intersection of all the sets + * held at the specified keys. If just a single key is specified, then this command + * produces the members of this set. If one of the keys is missing, FALSE is returned. + * + * @param string $key1 keys identifying the different sets on which we will apply the intersection. + * @param string $key2 ... + * @param string $keyN ... + * + * @return array contain the result of the intersection between those keys. + * If the intersection between the different sets is empty, the return value will be empty array. + * @link https://redis.io/commands/sinterstore + * @example + *
+     * $redisCluster->sAdd('key1', 'val1');
+     * $redisCluster->sAdd('key1', 'val2');
+     * $redisCluster->sAdd('key1', 'val3');
+     * $redisCluster->sAdd('key1', 'val4');
+     *
+     * $redisCluster->sAdd('key2', 'val3');
+     * $redisCluster->sAdd('key2', 'val4');
+     *
+     * $redisCluster->sAdd('key3', 'val3');
+     * $redisCluster->sAdd('key3', 'val4');
+     *
+     * var_dump($redisCluster->sInter('key1', 'key2', 'key3'));
+     *
+     * // Output:
+     * //
+     * //array(2) {
+     * //  [0]=>
+     * //  string(4) "val4"
+     * //  [1]=>
+     * //  string(4) "val3"
+     * //}
+     * 
+ */ + public function sInter($key1, $key2, $keyN = null) { } + + /** + * Performs a sInter command and stores the result in a new set. + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 are intersected as in sInter. + * @param string $key2 ... + * @param string $keyN ... + * + * @return int|false The cardinality of the resulting set, or FALSE in case of a missing key. + * @link https://redis.io/commands/sinterstore + * @example + *
+     * $redisCluster->sAdd('key1', 'val1');
+     * $redisCluster->sAdd('key1', 'val2');
+     * $redisCluster->sAdd('key1', 'val3');
+     * $redisCluster->sAdd('key1', 'val4');
+     *
+     * $redisCluster->sAdd('key2', 'val3');
+     * $redisCluster->sAdd('key2', 'val4');
+     *
+     * $redisCluster->sAdd('key3', 'val3');
+     * $redisCluster->sAdd('key3', 'val4');
+     *
+     * var_dump($redisCluster->sInterStore('output', 'key1', 'key2', 'key3'));
+     * var_dump($redisCluster->sMembers('output'));
+     *
+     * //// Output:
+     * //
+     * //int(2)
+     * //array(2) {
+     * //  [0]=>
+     * //  string(4) "val4"
+     * //  [1]=>
+     * //  string(4) "val3"
+     * //}
+     * 
+ */ + public function sInterStore($dstKey, $key1, $key2, $keyN = null) { } + + /** + * Performs the difference between N sets and returns it. + * + * @param string $key1 Any number of keys corresponding to sets in redis. + * @param string $key2 ... + * @param string $keyN ... + * + * @return array of strings: The difference of the first set will all the others. + * @link https://redis.io/commands/sdiff + * @example + *
+     * $redisCluster->del('s0', 's1', 's2');
+     *
+     * $redisCluster->sAdd('s0', '1');
+     * $redisCluster->sAdd('s0', '2');
+     * $redisCluster->sAdd('s0', '3');
+     * $redisCluster->sAdd('s0', '4');
+     *
+     * $redisCluster->sAdd('s1', '1');
+     * $redisCluster->sAdd('s2', '3');
+     *
+     * var_dump($redisCluster->sDiff('s0', 's1', 's2'));
+     *
+     * //// Output:
+     * //
+     * //array(2) {
+     * //  [0]=>
+     * //  string(1) "4"
+     * //  [1]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sDiff($key1, $key2, $keyN = null) { } + + /** + * Performs the same action as sDiff, but stores the result in the first key + * + * @param string $dstKey the key to store the diff into. + * @param string $key1 Any number of keys corresponding to sets in redis + * @param string $key2 ... + * @param string $keyN ... + * + * @return int|false The cardinality of the resulting set, or FALSE in case of a missing key. + * @link https://redis.io/commands/sdiffstore + * @example + *
+     * $redisCluster->del('s0', 's1', 's2');
+     *
+     * $redisCluster->sAdd('s0', '1');
+     * $redisCluster->sAdd('s0', '2');
+     * $redisCluster->sAdd('s0', '3');
+     * $redisCluster->sAdd('s0', '4');
+     *
+     * $redisCluster->sAdd('s1', '1');
+     * $redisCluster->sAdd('s2', '3');
+     *
+     * var_dump($redisCluster->sDiffStore('dst', 's0', 's1', 's2'));
+     * var_dump($redisCluster->sMembers('dst'));
+     *
+     * //// Output:
+     * //
+     * //int(2)
+     * //array(2) {
+     * //  [0]=>
+     * //  string(1) "4"
+     * //  [1]=>
+     * //  string(1) "2"
+     * //}
+     * 
+ */ + public function sDiffStore($dstKey, $key1, $key2, $keyN = null) { } + + /** + * Returns a random element(s) from the set value at Key, without removing it. + * + * @param string $key + * @param int $count [optional] + * + * @return string|array value(s) from the set + * bool FALSE if set identified by key is empty or doesn't exist and count argument isn't passed. + * @link https://redis.io/commands/srandmember + * @example + *
+     * $redisCluster->sAdd('key1' , 'one');
+     * $redisCluster->sAdd('key1' , 'two');
+     * $redisCluster->sAdd('key1' , 'three');              // 'key1' => {'one', 'two', 'three'}
+     *
+     * var_dump( $redisCluster->sRandMember('key1') );     // 'key1' => {'one', 'two', 'three'}
+     *
+     * // string(5) "three"
+     *
+     * var_dump( $redisCluster->sRandMember('key1', 2) );  // 'key1' => {'one', 'two', 'three'}
+     *
+     * // array(2) {
+     * //   [0]=> string(2) "one"
+     * //   [1]=> string(2) "three"
+     * // }
+     * 
+ */ + public function sRandMember($key, $count = null) { } + + /** + * Get the length of a string value. + * + * @param string $key + * + * @return int + * @link https://redis.io/commands/strlen + * @example + *
+     * $redisCluster->set('key', 'value');
+     * $redisCluster->strlen('key'); // 5
+     * 
+ */ + public function strlen($key) { } + + /** + * Remove the expiration timer from a key. + * + * @param string $key + * + * @return bool TRUE if a timeout was removed, FALSE if the key didn’t exist or didn’t have an expiration timer. + * @link https://redis.io/commands/persist + * @example $redisCluster->persist('key'); + */ + public function persist($key) { } + + /** + * Returns the remaining time to live of a key that has a timeout. + * This introspection capability allows a Redis client to check how many seconds a given key will continue to be + * part of the dataset. In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist + * but has no associated expire. Starting with Redis 2.8 the return value in case of error changed: Returns -2 if + * the key does not exist. Returns -1 if the key exists but has no associated expire. + * + * @param string $key + * + * @return int the time left to live in seconds. + * @link https://redis.io/commands/ttl + * @example $redisCluster->ttl('key'); + */ + public function ttl($key) { } + + /** + * Returns the remaining time to live of a key that has an expire set, + * with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in + * milliseconds. In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist but has + * no associated expire. Starting with Redis 2.8 the return value in case of error changed: Returns -2 if the key + * does not exist. Returns -1 if the key exists but has no associated expire. + * + * @param string $key + * + * @return int the time left to live in milliseconds. + * @link https://redis.io/commands/pttl + * @example $redisCluster->pttl('key'); + */ + public function pttl($key) { } + + /** + * Returns the cardinality of an ordered set. + * + * @param string $key + * + * @return int the set's cardinality + * @link https://redis.io/commands/zsize + * @example + *
+     * $redisCluster->zAdd('key', 0, 'val0');
+     * $redisCluster->zAdd('key', 2, 'val2');
+     * $redisCluster->zAdd('key', 10, 'val10');
+     * $redisCluster->zCard('key');            // 3
+     * 
+ */ + public function zCard($key) { } + + /** + * Returns the number of elements of the sorted set stored at the specified key which have + * scores in the range [start,end]. Adding a parenthesis before start or end excludes it + * from the range. +inf and -inf are also valid limits. + * + * @param string $key + * @param string $start + * @param string $end + * + * @return int the size of a corresponding zRangeByScore. + * @link https://redis.io/commands/zcount + * @example + *
+     * $redisCluster->zAdd('key', 0, 'val0');
+     * $redisCluster->zAdd('key', 2, 'val2');
+     * $redisCluster->zAdd('key', 10, 'val10');
+     * $redisCluster->zCount('key', 0, 3); // 2, corresponding to array('val0', 'val2')
+     * 
+ */ + public function zCount($key, $start, $end) { } + + /** + * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end]. + * + * @param string $key + * @param float|string $start double or "+inf" or "-inf" string + * @param float|string $end double or "+inf" or "-inf" string + * + * @return int The number of values deleted from the sorted set + * @link https://redis.io/commands/zremrangebyscore + * @example + *
+     * $redisCluster->zAdd('key', 0, 'val0');
+     * $redisCluster->zAdd('key', 2, 'val2');
+     * $redisCluster->zAdd('key', 10, 'val10');
+     * $redisCluster->zRemRangeByScore('key', 0, 3); // 2
+     * 
+ */ + public function zRemRangeByScore($key, $start, $end) { } + + /** + * Returns the score of a given member in the specified sorted set. + * + * @param string $key + * @param string $member + * + * @return float + * @link https://redis.io/commands/zscore + * @example + *
+     * $redisCluster->zAdd('key', 2.5, 'val2');
+     * $redisCluster->zScore('key', 'val2'); // 2.5
+     * 
+ */ + public function zScore($key, $member) { } + + /** + * Adds the specified member with a given score to the sorted set stored at key. + * + * @param string $key Required key + * @param float $score1 Required score + * @param string $value1 Required value + * @param float $score2 Optional score + * @param string $value2 Optional value + * @param float $scoreN Optional score + * @param string $valueN Optional value + * + * @return int Number of values added + * @link https://redis.io/commands/zadd + * @example + *
+     * $redisCluster->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(3)
+     * $redisCluster->zRem('z', 'v2', 'v3');                           // int(2)
+     * var_dump( $redisCluster->zRange('z', 0, -1) );
+     *
+     * //// Output:
+     * // array(1) {
+     * //   [0]=> string(2) "v4"
+     * // }
+     * 
+ */ + public function zAdd($key, $score1, $value1, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) { } + + /** + * Increments the score of a member from a sorted set by a given amount. + * + * @param string $key + * @param float $value (double) value that will be added to the member's score + * @param string $member + * + * @return float the new value + * @link https://redis.io/commands/zincrby + * @example + *
+     * $redisCluster->del('key');
+     * $redisCluster->zIncrBy('key', 2.5, 'member1');// key or member1 didn't exist, so member1's score is to 0 ;
+     *                                              //before the increment and now has the value 2.5
+     * $redisCluster->zIncrBy('key', 1, 'member1');    // 3.5
+     * 
+ */ + public function zIncrBy($key, $value, $member) { } + + /** + * Returns the length of a hash, in number of items + * + * @param string $key + * + * @return int|false the number of items in a hash, FALSE if the key doesn't exist or isn't a hash. + * @link https://redis.io/commands/hlen + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'key1', 'hello');
+     * $redisCluster->hSet('h', 'key2', 'plop');
+     * $redisCluster->hLen('h'); // returns 2
+     * 
+ */ + public function hLen($key) { } + + /** + * Returns the keys in a hash, as an array of strings. + * + * @param string $key + * + * @return array An array of elements, the keys of the hash. This works like PHP's array_keys(). + * @link https://redis.io/commands/hkeys + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'a', 'x');
+     * $redisCluster->hSet('h', 'b', 'y');
+     * $redisCluster->hSet('h', 'c', 'z');
+     * $redisCluster->hSet('h', 'd', 't');
+     * var_dump($redisCluster->hKeys('h'));
+     *
+     * //// Output:
+     * //
+     * // array(4) {
+     * // [0]=>
+     * // string(1) "a"
+     * // [1]=>
+     * // string(1) "b"
+     * // [2]=>
+     * // string(1) "c"
+     * // [3]=>
+     * // string(1) "d"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hKeys($key) { } + + /** + * Returns the values in a hash, as an array of strings. + * + * @param string $key + * + * @return array An array of elements, the values of the hash. This works like PHP's array_values(). + * @link https://redis.io/commands/hvals + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'a', 'x');
+     * $redisCluster->hSet('h', 'b', 'y');
+     * $redisCluster->hSet('h', 'c', 'z');
+     * $redisCluster->hSet('h', 'd', 't');
+     * var_dump($redisCluster->hVals('h'));
+     *
+     * //// Output:
+     * //
+     * // array(4) {
+     * //   [0]=>
+     * //   string(1) "x"
+     * //   [1]=>
+     * //   string(1) "y"
+     * //   [2]=>
+     * //   string(1) "z"
+     * //   [3]=>
+     * //   string(1) "t"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hVals($key) { } + + /** + * Gets a value from the hash stored at key. + * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned. + * + * @param string $key + * @param string $hashKey + * + * @return string|false The value, if the command executed successfully BOOL FALSE in case of failure + * @link https://redis.io/commands/hget + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'a', 'x');
+     * $redisCluster->hGet('h', 'a'); // 'X'
+     * 
+ */ + public function hGet($key, $hashKey) { } + + /** + * Returns the whole hash, as an array of strings indexed by strings. + * + * @param string $key + * + * @return array An array of elements, the contents of the hash. + * @link https://redis.io/commands/hgetall + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'a', 'x');
+     * $redisCluster->hSet('h', 'b', 'y');
+     * $redisCluster->hSet('h', 'c', 'z');
+     * $redisCluster->hSet('h', 'd', 't');
+     * var_dump($redisCluster->hGetAll('h'));
+     *
+     * //// Output:
+     * //
+     * // array(4) {
+     * //   ["a"]=>
+     * //   string(1) "x"
+     * //   ["b"]=>
+     * //   string(1) "y"
+     * //   ["c"]=>
+     * //   string(1) "z"
+     * //   ["d"]=>
+     * //   string(1) "t"
+     * // }
+     * // The order is random and corresponds to redis' own internal representation of the set structure.
+     * 
+ */ + public function hGetAll($key) { } + + /** + * Verify if the specified member exists in a key. + * + * @param string $key + * @param string $hashKey + * + * @return bool If the member exists in the hash table, return TRUE, otherwise return FALSE. + * @link https://redis.io/commands/hexists + * @example + *
+     * $redisCluster->hSet('h', 'a', 'x');
+     * $redisCluster->hExists('h', 'a');               //  TRUE
+     * $redisCluster->hExists('h', 'NonExistingKey');  // FALSE
+     * 
+ */ + public function hExists($key, $hashKey) { } + + /** + * Increments the value of a member from a hash by a given amount. + * + * @param string $key + * @param string $hashKey + * @param int $value (integer) value that will be added to the member's value + * + * @return int the new value + * @link https://redis.io/commands/hincrby + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hIncrBy('h', 'x', 2); // returns 2: h[x] = 2 now.
+     * $redisCluster->hIncrBy('h', 'x', 1); // h[x] ← 2 + 1. Returns 3
+     * 
+ */ + public function hIncrBy($key, $hashKey, $value) { } + + /** + * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned. + * + * @param string $key + * @param string $hashKey + * @param string $value + * + * @return int + * 1 if value didn't exist and was added successfully, + * 0 if the value was already present and was replaced, FALSE if there was an error. + * @link https://redis.io/commands/hset + * @example + *
+     * $redisCluster->del('h')
+     * $redisCluster->hSet('h', 'key1', 'hello');  // 1, 'key1' => 'hello' in the hash at "h"
+     * $redisCluster->hGet('h', 'key1');           // returns "hello"
+     *
+     * $redisCluster->hSet('h', 'key1', 'plop');   // 0, value was replaced.
+     * $redisCluster->hGet('h', 'key1');           // returns "plop"
+     * 
+ */ + public function hSet($key, $hashKey, $value) { } + + /** + * Adds a value to the hash stored at key only if this field isn't already in the hash. + * + * @param string $key + * @param string $hashKey + * @param string $value + * + * @return bool TRUE if the field was set, FALSE if it was already present. + * @link https://redis.io/commands/hsetnx + * @example + *
+     * $redisCluster->del('h')
+     * $redisCluster->hSetNx('h', 'key1', 'hello'); // TRUE, 'key1' => 'hello' in the hash at "h"
+     * $redisCluster->hSetNx('h', 'key1', 'world'); // FALSE, 'key1' => 'hello' in the hash at "h". No change since the
+     * field wasn't replaced.
+     * 
+ */ + public function hSetNx($key, $hashKey, $value) { } + + /** + * Retirieve the values associated to the specified fields in the hash. + * + * @param string $key + * @param array $hashKeys + * + * @return array Array An array of elements, the values of the specified fields in the hash, + * with the hash keys as array keys. + * @link https://redis.io/commands/hmget + * @example + *
+     * $redisCluster->del('h');
+     * $redisCluster->hSet('h', 'field1', 'value1');
+     * $redisCluster->hSet('h', 'field2', 'value2');
+     * $redisCluster->hMGet('h', array('field1', 'field2')); // returns array('field1' => 'value1', 'field2' =>
+     * 'value2')
+     * 
+ */ + public function hMGet($key, $hashKeys) { } + + /** + * Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast. + * NULL values are stored as empty strings + * + * @param string $key + * @param array $hashKeys key → value array + * + * @return bool + * @link https://redis.io/commands/hmset + * @example + *
+     * $redisCluster->del('user:1');
+     * $redisCluster->hMSet('user:1', array('name' => 'Joe', 'salary' => 2000));
+     * $redisCluster->hIncrBy('user:1', 'salary', 100); // Joe earns 100 more now.
+     * 
+ */ + public function hMSet($key, $hashKeys) { } + + /** + * Removes a values from the hash stored at key. + * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned. + * + * @param string $key + * @param string $hashKey1 + * @param string $hashKey2 + * @param string $hashKeyN + * + * @return int Number of deleted fields + * @link https://redis.io/commands/hdel + * @example + *
+     * $redisCluster->hMSet('h',
+     *               array(
+     *                    'f1' => 'v1',
+     *                    'f2' => 'v2',
+     *                    'f3' => 'v3',
+     *                    'f4' => 'v4',
+     *               ));
+     *
+     * var_dump( $redisCluster->hDel('h', 'f1') );        // int(1)
+     * var_dump( $redisCluster->hDel('h', 'f2', 'f3') );  // int(2)
+     *
+     * var_dump( $redisCluster->hGetAll('h') );
+     *
+     * //// Output:
+     * //
+     * //  array(1) {
+     * //    ["f4"]=> string(2) "v4"
+     * //  }
+     * 
+ */ + public function hDel($key, $hashKey1, $hashKey2 = null, $hashKeyN = null) { } + + /** + * Increment the float value of a hash field by the given amount + * + * @param string $key + * @param string $field + * @param float $increment + * + * @return float + * @link https://redis.io/commands/hincrbyfloat + * @example + *
+     * $redisCluster->hset('h', 'float', 3);
+     * $redisCluster->hset('h', 'int',   3);
+     * var_dump( $redisCluster->hIncrByFloat('h', 'float', 1.5) ); // float(4.5)
+     *
+     * var_dump( $redisCluster->hGetAll('h') );
+     *
+     * //// Output:
+     * //
+     * // array(2) {
+     * //   ["float"]=>
+     * //   string(3) "4.5"
+     * //   ["int"]=>
+     * //   string(1) "3"
+     * // }
+     * 
+ */ + public function hIncrByFloat($key, $field, $increment) { } + + /** + * Dump a key out of a redis database, the value of which can later be passed into redis using the RESTORE command. + * The data that comes out of DUMP is a binary representation of the key as Redis stores it. + * + * @param string $key + * + * @return string|false The Redis encoded value of the key, or FALSE if the key doesn't exist + * @link https://redis.io/commands/dump + * @example + *
+     * $redisCluster->set('foo', 'bar');
+     * $val = $redisCluster->dump('foo'); // $val will be the Redis encoded key value
+     * 
+ */ + public function dump($key) { } + + /** + * Returns the rank of a given member in the specified sorted set, starting at 0 for the item + * with the smallest score. zRevRank starts at 0 for the item with the largest score. + * + * @param string $key + * @param string $member + * + * @return int the item's score. + * @link https://redis.io/commands/zrank + * @example + *
+     * $redisCluster->del('z');
+     * $redisCluster->zAdd('key', 1, 'one');
+     * $redisCluster->zAdd('key', 2, 'two');
+     * $redisCluster->zRank('key', 'one');     // 0
+     * $redisCluster->zRank('key', 'two');     // 1
+     * $redisCluster->zRevRank('key', 'one');  // 1
+     * $redisCluster->zRevRank('key', 'two');  // 0
+     * 
+ */ + public function zRank($key, $member) { } + + /** + * @see zRank() + * + * @param string $key + * @param string $member + * + * @return int the item's score + * @link https://redis.io/commands/zrevrank + */ + public function zRevRank($key, $member) { } + + /** + * Increment the number stored at key by one. + * + * @param string $key + * + * @return int the new value + * @link https://redis.io/commands/incr + * @example + *
+     * $redisCluster->incr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value 1
+     * $redisCluster->incr('key1'); // 2
+     * $redisCluster->incr('key1'); // 3
+     * $redisCluster->incr('key1'); // 4
+     * 
+ */ + public function incr($key) { } + + /** + * Decrement the number stored at key by one. + * + * @param string $key + * + * @return int the new value + * @link https://redis.io/commands/decr + * @example + *
+     * $redisCluster->decr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value -1
+     * $redisCluster->decr('key1'); // -2
+     * $redisCluster->decr('key1'); // -3
+     * 
+ */ + public function decr($key) { } + + /** + * Increment the number stored at key by one. If the second argument is filled, it will be used as the integer + * value of the increment. + * + * @param string $key key + * @param int $value value that will be added to key (only for incrBy) + * + * @return int the new value + * @link https://redis.io/commands/incrby + * @example + *
+     * $redisCluster->incr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value 1
+     * $redisCluster->incr('key1');        // 2
+     * $redisCluster->incr('key1');        // 3
+     * $redisCluster->incr('key1');        // 4
+     * $redisCluster->incrBy('key1', 10);  // 14
+     * 
+ */ + public function incrBy($key, $value) { } + + /** + * Decrement the number stored at key by one. If the second argument is filled, it will be used as the integer + * value of the decrement. + * + * @param string $key + * @param int $value that will be subtracted to key (only for decrBy) + * + * @return int the new value + * @link https://redis.io/commands/decrby + * @example + *
+     * $redisCluster->decr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value -1
+     * $redisCluster->decr('key1');        // -2
+     * $redisCluster->decr('key1');        // -3
+     * $redisCluster->decrBy('key1', 10);  // -13
+     * 
+ */ + public function decrBy($key, $value) { } + + /** + * Increment the float value of a key by the given amount + * + * @param string $key + * @param float $increment + * + * @return float + * @link https://redis.io/commands/incrbyfloat + * @example + *
+     * $redisCluster->set('x', 3);
+     * var_dump( $redisCluster->incrByFloat('x', 1.5) );   // float(4.5)
+     *
+     * var_dump( $redisCluster->get('x') );                // string(3) "4.5"
+     * 
+ */ + public function incrByFloat($key, $increment) { } + + /** + * Sets an expiration date (a timeout) on an item. + * + * @param string $key The key that will disappear. + * @param int $ttl The key's remaining Time To Live, in seconds. + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/expire + * @example + *
+     * $redisCluster->set('x', '42');
+     * $redisCluster->expire('x', 3);  // x will disappear in 3 seconds.
+     * sleep(5);                    // wait 5 seconds
+     * $redisCluster->get('x');            // will return `FALSE`, as 'x' has expired.
+     * 
+ */ + public function expire($key, $ttl) { } + + /** + * Sets an expiration date (a timeout in milliseconds) on an item. + * + * @param string $key The key that will disappear. + * @param int $ttl The key's remaining Time To Live, in milliseconds. + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/pexpire + * @example + *
+     * $redisCluster->set('x', '42');
+     * $redisCluster->pExpire('x', 11500); // x will disappear in 11500 milliseconds.
+     * $redisCluster->ttl('x');            // 12
+     * $redisCluster->pttl('x');           // 11500
+     * 
+ */ + public function pExpire($key, $ttl) { } + + /** + * Sets an expiration date (a timestamp) on an item. + * + * @param string $key The key that will disappear. + * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time. + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/expireat + * @example + *
+     * $redisCluster->set('x', '42');
+     * $now = time();               // current timestamp
+     * $redisCluster->expireAt('x', $now + 3); // x will disappear in 3 seconds.
+     * sleep(5);                        // wait 5 seconds
+     * $redisCluster->get('x');                // will return `FALSE`, as 'x' has expired.
+     * 
+ */ + public function expireAt($key, $timestamp) { } + + /** + * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds + * + * @param string $key The key that will disappear. + * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time. + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/pexpireat + * @example + *
+     * $redisCluster->set('x', '42');
+     * $redisCluster->pExpireAt('x', 1555555555005);
+     * $redisCluster->ttl('x');                       // 218270121
+     * $redisCluster->pttl('x');                      // 218270120575
+     * 
+ */ + public function pExpireAt($key, $timestamp) { } + + /** + * Append specified string to the string stored in specified key. + * + * @param string $key + * @param string $value + * + * @return int Size of the value after the append + * @link https://redis.io/commands/append + * @example + *
+     * $redisCluster->set('key', 'value1');
+     * $redisCluster->append('key', 'value2'); // 12
+     * $redisCluster->get('key');              // 'value1value2'
+     * 
+ */ + public function append($key, $value) { } + + /** + * Return a single bit out of a larger string + * + * @param string $key + * @param int $offset + * + * @return int the bit value (0 or 1) + * @link https://redis.io/commands/getbit + * @example + *
+     * $redisCluster->set('key', "\x7f");  // this is 0111 1111
+     * $redisCluster->getBit('key', 0);    // 0
+     * $redisCluster->getBit('key', 1);    // 1
+     * 
+ */ + public function getBit($key, $offset) { } + + /** + * Changes a single bit of a string. + * + * @param string $key + * @param int $offset + * @param bool|int $value bool or int (1 or 0) + * + * @return int 0 or 1, the value of the bit before it was set. + * @link https://redis.io/commands/setbit + * @example + *
+     * $redisCluster->set('key', "*");     // ord("*") = 42 = 0x2f = "0010 1010"
+     * $redisCluster->setBit('key', 5, 1); // returns 0
+     * $redisCluster->setBit('key', 7, 1); // returns 0
+     * $redisCluster->get('key');          // chr(0x2f) = "/" = b("0010 1111")
+     * 
+ */ + public function setBit($key, $offset, $value) { } + + /** + * Bitwise operation on multiple keys. + * + * @param string $operation either "AND", "OR", "NOT", "XOR" + * @param string $retKey return key + * @param string $key1 + * @param string $key2 + * @param string $key3 + * + * @return int The size of the string stored in the destination key. + * @link https://redis.io/commands/bitop + * @example + *
+     * $redisCluster->set('bit1', '1'); // 11 0001
+     * $redisCluster->set('bit2', '2'); // 11 0010
+     *
+     * $redisCluster->bitOp('AND', 'bit', 'bit1', 'bit2'); // bit = 110000
+     * $redisCluster->bitOp('OR',  'bit', 'bit1', 'bit2'); // bit = 110011
+     * $redisCluster->bitOp('NOT', 'bit', 'bit1', 'bit2'); // bit = 110011
+     * $redisCluster->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11
+     * 
+ */ + public function bitOp($operation, $retKey, $key1, $key2, $key3 = null) { } + + /** + * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the + * string as an array of bits from left to right, where the first byte's most significant bit is at position 0, + * the second byte's most significant bit is at position 8, and so forth. + * + * @param string $key + * @param int $bit + * @param int $start + * @param int $end + * + * @return int The command returns the position of the first bit set to 1 or 0 according to the request. + * If we look for set bits (the bit argument is 1) and the string is empty or composed of just + * zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string + * only contains bit set to 1, the function returns the first bit not part of the string on the + * right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will + * return 24, since up to bit 23 all the bits are 1. Basically, the function considers the right + * of the string as padded with zeros if you look for clear bits and specify no range or the + * start argument only. However, this behavior changes if you are looking for clear bits and + * specify a range with both start and end. If no clear bit is found in the specified range, the + * function returns -1 as the user specified a clear range and there are no 0 bits in that range. + * @link https://redis.io/commands/bitpos + * @example + *
+     * $redisCluster->set('key', '\xff\xff');
+     * $redisCluster->bitpos('key', 1); // int(0)
+     * $redisCluster->bitpos('key', 1, 1); // int(8)
+     * $redisCluster->bitpos('key', 1, 3); // int(-1)
+     * $redisCluster->bitpos('key', 0); // int(16)
+     * $redisCluster->bitpos('key', 0, 1); // int(16)
+     * $redisCluster->bitpos('key', 0, 1, 5); // int(-1)
+     * 
+ */ + public function bitpos($key, $bit, $start = 0, $end = null) { } + + /** + * Count bits in a string. + * + * @param string $key + * + * @return int The number of bits set to 1 in the value behind the input key. + * @link https://redis.io/commands/bitcount + * @example + *
+     * $redisCluster->set('bit', '345'); // // 11 0011  0011 0100  0011 0101
+     * var_dump( $redisCluster->bitCount('bit', 0, 0) ); // int(4)
+     * var_dump( $redisCluster->bitCount('bit', 1, 1) ); // int(3)
+     * var_dump( $redisCluster->bitCount('bit', 2, 2) ); // int(4)
+     * var_dump( $redisCluster->bitCount('bit', 0, 2) ); // int(11)
+     * 
+ */ + public function bitCount($key) { } + + /** + * @see lIndex() + * + * @param string $key + * @param int $index + * + * @link https://redis.io/commands/lindex + */ + public function lGet($key, $index) { } + + /** + * Return a substring of a larger string + * + * @param string $key + * @param int $start + * @param int $end + * + * @return string the substring + * @link https://redis.io/commands/getrange + * @example + *
+     * $redisCluster->set('key', 'string value');
+     * $redisCluster->getRange('key', 0, 5);   // 'string'
+     * $redisCluster->getRange('key', -5, -1); // 'value'
+     * 
+ */ + public function getRange($key, $start, $end) { } + + /** + * Trims an existing list so that it will contain only a specified range of elements. + * + * @param string $key + * @param int $start + * @param int $stop + * + * @return array|false Bool return FALSE if the key identify a non-list value. + * @link https://redis.io/commands/ltrim + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');
+     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B', 'C')
+     * $redisCluster->lTrim('key1', 0, 1);
+     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B')
+     * 
+ */ + public function lTrim($key, $start, $stop) { } + + /** + * Returns the specified elements of the list stored at the specified key in + * the range [start, end]. start and stop are interpretated as indices: 0 the first element, + * 1 the second ... -1 the last element, -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * + * @return array containing the values in specified range. + * @link https://redis.io/commands/lrange + * @example + *
+     * $redisCluster->rPush('key1', 'A');
+     * $redisCluster->rPush('key1', 'B');
+     * $redisCluster->rPush('key1', 'C');
+     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B', 'C')
+     * 
+ */ + public function lRange($key, $start, $end) { } + + /** + * Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end]. + * + * @param string $key + * @param int $start + * @param int $end + * + * @return int The number of values deleted from the sorted set + * @link https://redis.io/commands/zremrangebyrank + * @example + *
+     * $redisCluster->zAdd('key', 1, 'one');
+     * $redisCluster->zAdd('key', 2, 'two');
+     * $redisCluster->zAdd('key', 3, 'three');
+     * $redisCluster->zRemRangeByRank('key', 0, 1); // 2
+     * $redisCluster->zRange('key', 0, -1, true); // array('three' => 3)
+     * 
+ */ + public function zRemRangeByRank($key, $start, $end) { } + + /** + * Publish messages to channels. Warning: this function will probably change in the future. + * + * @param string $channel a channel to publish to + * @param string $message string + * + * @link https://redis.io/commands/publish + * @return int Number of clients that received the message + * @example $redisCluster->publish('chan-1', 'hello, world!'); // send message. + */ + public function publish($channel, $message) { } + + /** + * Renames a key. + * + * @param string $srcKey + * @param string $dstKey + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/rename + * @example + *
+     * $redisCluster->set('x', '42');
+     * $redisCluster->rename('x', 'y');
+     * $redisCluster->get('y');   // → 42
+     * $redisCluster->get('x');   // → `FALSE`
+     * 
+ */ + public function rename($srcKey, $dstKey) { } + + /** + * Renames a key. + * + * Same as rename, but will not replace a key if the destination already exists. + * This is the same behaviour as setNx. + * + * @param string $srcKey + * @param string $dstKey + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/renamenx + * @example + *
+     * $redisCluster->set('x', '42');
+     * $redisCluster->renameNx('x', 'y');
+     * $redisCluster->get('y');   // → 42
+     * $redisCluster->get('x');   // → `FALSE`
+     * 
+ */ + public function renameNx($srcKey, $dstKey) { } + + /** + * When called with a single key, returns the approximated cardinality computed by the HyperLogLog data + * structure stored at the specified variable, which is 0 if the variable does not exist. + * + * @param string|array $key + * + * @return int + * @link https://redis.io/commands/pfcount + * @example + *
+     * $redisCluster->pfAdd('key1', array('elem1', 'elem2'));
+     * $redisCluster->pfAdd('key2', array('elem3', 'elem2'));
+     * $redisCluster->pfCount('key1'); // int(2)
+     * $redisCluster->pfCount(array('key1', 'key2')); // int(3)
+     */
+    public function pfCount($key) { }
+
+    /**
+     * Adds all the element arguments to the HyperLogLog data structure stored at the key.
+     *
+     * @param   string $key
+     * @param   array  $elements
+     *
+     * @return  bool
+     * @link    https://redis.io/commands/pfadd
+     * @example $redisCluster->pfAdd('key', array('elem1', 'elem2'))
+     */
+    public function pfAdd($key, array $elements) { }
+
+    /**
+     * Merge multiple HyperLogLog values into an unique value that will approximate the cardinality
+     * of the union of the observed Sets of the source HyperLogLog structures.
+     *
+     * @param   string $destKey
+     * @param   array  $sourceKeys
+     *
+     * @return  bool
+     * @link    https://redis.io/commands/pfmerge
+     * @example
+     * 
+     * $redisCluster->pfAdd('key1', array('elem1', 'elem2'));
+     * $redisCluster->pfAdd('key2', array('elem3', 'elem2'));
+     * $redisCluster->pfMerge('key3', array('key1', 'key2'));
+     * $redisCluster->pfCount('key3'); // int(3)
+     */
+    public function pfMerge($destKey, array $sourceKeys) { }
+
+    /**
+     * Changes a substring of a larger string.
+     *
+     * @param   string $key
+     * @param   int    $offset
+     * @param   string $value
+     *
+     * @return  string the length of the string after it was modified.
+     * @link    https://redis.io/commands/setrange
+     * @example
+     * 
+     * $redisCluster->set('key', 'Hello world');
+     * $redisCluster->setRange('key', 6, "redis"); // returns 11
+     * $redisCluster->get('key');                  // "Hello redis"
+     * 
+ */ + public function setRange($key, $offset, $value) { } + + /** + * Restore a key from the result of a DUMP operation. + * + * @param string $key The key name + * @param int $ttl How long the key should live (if zero, no expire will be set on the key) + * @param string $value (binary). The Redis encoded key value (from DUMP) + * + * @return bool + * @link https://redis.io/commands/restore + * @example + *
+     * $redisCluster->set('foo', 'bar');
+     * $val = $redisCluster->dump('foo');
+     * $redisCluster->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'
+     * 
+ */ + public function restore($key, $ttl, $value) { } + + /** + * Moves the specified member from the set at srcKey to the set at dstKey. + * + * @param string $srcKey + * @param string $dstKey + * @param string $member + * + * @return bool If the operation is successful, return TRUE. + * If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned. + * @link https://redis.io/commands/smove + * @example + *
+     * $redisCluster->sAdd('key1' , 'set11');
+     * $redisCluster->sAdd('key1' , 'set12');
+     * $redisCluster->sAdd('key1' , 'set13');          // 'key1' => {'set11', 'set12', 'set13'}
+     * $redisCluster->sAdd('key2' , 'set21');
+     * $redisCluster->sAdd('key2' , 'set22');          // 'key2' => {'set21', 'set22'}
+     * $redisCluster->sMove('key1', 'key2', 'set13');  // 'key1' =>  {'set11', 'set12'}
+     *                                          // 'key2' =>  {'set21', 'set22', 'set13'}
+     * 
+ */ + public function sMove($srcKey, $dstKey, $member) { } + + /** + * Returns a range of elements from the ordered set stored at the specified key, + * with values in the range [start, end]. start and stop are interpreted as zero-based indices: + * 0 the first element, + * 1 the second ... + * -1 the last element, + * -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * @param bool $withscores + * + * @return array Array containing the values in specified range. + * @link https://redis.io/commands/zrange + * @example + *
+     * $redisCluster->zAdd('key1', 0, 'val0');
+     * $redisCluster->zAdd('key1', 2, 'val2');
+     * $redisCluster->zAdd('key1', 10, 'val10');
+     * $redisCluster->zRange('key1', 0, -1); // array('val0', 'val2', 'val10')
+     * // with scores
+     * $redisCluster->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10)
+     * 
+ */ + public function zRange($key, $start, $end, $withscores = null) { } + + /** + * Returns the elements of the sorted set stored at the specified key in the range [start, end] + * in reverse order. start and stop are interpretated as zero-based indices: + * 0 the first element, + * 1 the second ... + * -1 the last element, + * -2 the penultimate ... + * + * @param string $key + * @param int $start + * @param int $end + * @param bool $withscore + * + * @return array Array containing the values in specified range. + * @link https://redis.io/commands/zrevrange + * @example + *
+     * $redisCluster->zAdd('key', 0, 'val0');
+     * $redisCluster->zAdd('key', 2, 'val2');
+     * $redisCluster->zAdd('key', 10, 'val10');
+     * $redisCluster->zRevRange('key', 0, -1); // array('val10', 'val2', 'val0')
+     *
+     * // with scores
+     * $redisCluster->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0)
+     * 
+ */ + public function zRevRange($key, $start, $end, $withscore = null) { } + + /** + * Returns the elements of the sorted set stored at the specified key which have scores in the + * range [start,end]. Adding a parenthesis before start or end excludes it from the range. + * +inf and -inf are also valid limits. + * + * zRevRangeByScore returns the same items in reverse order, when the start and end parameters are swapped. + * + * @param string $key + * @param int $start + * @param int $end + * @param array $options Two options are available: + * - withscores => TRUE, + * - and limit => array($offset, $count) + * + * @return array Array containing the values in specified range. + * @link https://redis.io/commands/zrangebyscore + * @example + *
+     * $redisCluster->zAdd('key', 0, 'val0');
+     * $redisCluster->zAdd('key', 2, 'val2');
+     * $redisCluster->zAdd('key', 10, 'val10');
+     * $redisCluster->zRangeByScore('key', 0, 3);
+     * // array('val0', 'val2')
+     * $redisCluster->zRangeByScore('key', 0, 3, array('withscores' => TRUE);
+     * // array('val0' => 0, 'val2' => 2)
+     * $redisCluster->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));
+     * // array('val2' => 2)
+     * $redisCluster->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));
+     * // array('val2')
+     * $redisCluster->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1));
+     * // array('val2'=> 2)
+     * 
+ */ + public function zRangeByScore($key, $start, $end, array $options = array()) { } + + /** + * @see zRangeByScore() + * + * @param string $key + * @param int $start + * @param int $end + * @param array $options + * + * @return array + */ + public function zRevRangeByScore($key, $start, $end, array $options = array()) { } + + /** + * Returns a range of members in a sorted set, by lexicographical range + * + * @param string $key The ZSET you wish to run against. + * @param int $min The minimum alphanumeric value you wish to get. + * @param int $max The maximum alphanumeric value you wish to get. + * @param int $offset Optional argument if you wish to start somewhere other than the first element. + * @param int $limit Optional argument if you wish to limit the number of elements returned. + * + * @return array Array containing the values in the specified range. + * @link https://redis.io/commands/zrangebylex + * @example + *
+     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
+     *     $redisCluster->zAdd('key', $k, $char);
+     * }
+     *
+     * $redisCluster->zRangeByLex('key', '-', '[c'); // array('a', 'b', 'c')
+     * $redisCluster->zRangeByLex('key', '-', '(c'); // array('a', 'b')
+     * $redisCluster->zRevRangeByLex('key', '(c','-'); // array('b', 'a')
+     * 
+ */ + public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) { } + + /** + * @see zRangeByLex() + * + * @param string $key + * @param int $min + * @param int $max + * @param int $offset + * @param int $limit + * + * @return array + * @link https://redis.io/commands/zrevrangebylex + */ + public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) { } + + /** + * Count the number of members in a sorted set between a given lexicographical range. + * + * @param string $key + * @param int $min + * @param int $max + * + * @return int The number of elements in the specified score range. + * @link https://redis.io/commands/zlexcount + * @example + *
+     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
+     *     $redisCluster->zAdd('key', $k, $char);
+     * }
+     * $redisCluster->zLexCount('key', '[b', '[f'); // 5
+     * 
+ */ + public function zLexCount($key, $min, $max) { } + + /** + * Remove all members in a sorted set between the given lexicographical range. + * + * @param string $key The ZSET you wish to run against. + * @param int $min The minimum alphanumeric value you wish to get. + * @param int $max The maximum alphanumeric value you wish to get. + * + * @return array the number of elements removed. + * @link https://redis.io/commands/zremrangebylex + * @example + *
+     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
+     *     $redisCluster->zAdd('key', $k, $char);
+     * }
+     * $redisCluster->zRemRangeByLex('key', '(b','[d'); // 2 , remove element 'c' and 'd'
+     * $redisCluster->zRange('key',0,-1);// array('a','b','e','f','g')
+     * 
+ */ + public function zRemRangeByLex($key, $min, $max) { + } + + /** + * Add multiple sorted sets and store the resulting sorted set in a new key + * + * @param string $Output + * @param array $ZSetKeys + * @param array $Weights + * @param string $aggregateFunction Either "SUM", "MIN", or "MAX": defines the behaviour to use on + * duplicate entries during the zUnion. + * + * @return int The number of values in the new sorted set. + * @link https://redis.io/commands/zunionstore + * @example + *
+     * $redisCluster->del('k1');
+     * $redisCluster->del('k2');
+     * $redisCluster->del('k3');
+     * $redisCluster->del('ko1');
+     * $redisCluster->del('ko2');
+     * $redisCluster->del('ko3');
+     *
+     * $redisCluster->zAdd('k1', 0, 'val0');
+     * $redisCluster->zAdd('k1', 1, 'val1');
+     *
+     * $redisCluster->zAdd('k2', 2, 'val2');
+     * $redisCluster->zAdd('k2', 3, 'val3');
+     *
+     * $redisCluster->zUnionStore('ko1', array('k1', 'k2')); // 4, 'ko1' => array('val0', 'val1', 'val2', 'val3')
+     *
+     * // Weighted zUnionStore
+     * $redisCluster->zUnionStore('ko2', array('k1', 'k2'), array(1, 1)); // 4, 'ko2' => array('val0', 'val1', 'val2','val3')
+     * $redisCluster->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3','val1')
+     * 
+ */ + public function zUnionStore($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') { } + + /** + * Intersect multiple sorted sets and store the resulting sorted set in a new key + * + * @param string $Output + * @param array $ZSetKeys + * @param array $Weights + * @param string $aggregateFunction Either "SUM", "MIN", or "MAX": + * defines the behaviour to use on duplicate entries during the zInterStore. + * + * @return int The number of values in the new sorted set. + * @link https://redis.io/commands/zinterstore + * @example + *
+     * $redisCluster->del('k1');
+     * $redisCluster->del('k2');
+     * $redisCluster->del('k3');
+     *
+     * $redisCluster->del('ko1');
+     * $redisCluster->del('ko2');
+     * $redisCluster->del('ko3');
+     * $redisCluster->del('ko4');
+     *
+     * $redisCluster->zAdd('k1', 0, 'val0');
+     * $redisCluster->zAdd('k1', 1, 'val1');
+     * $redisCluster->zAdd('k1', 3, 'val3');
+     *
+     * $redisCluster->zAdd('k2', 2, 'val1');
+     * $redisCluster->zAdd('k2', 3, 'val3');
+     *
+     * $redisCluster->zInterStore('ko1', array('k1', 'k2'));               // 2, 'ko1' => array('val1', 'val3')
+     * $redisCluster->zInterStore('ko2', array('k1', 'k2'), array(1, 1));  // 2, 'ko2' => array('val1', 'val3')
+     *
+     * // Weighted zInterStore
+     * $redisCluster->zInterStore('ko3', array('k1', 'k2'), array(1, 5), 'min'); // 2, 'ko3' => array('val1', 'val3')
+     * $redisCluster->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1')
+     * 
+ */ + public function zInterStore($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') { } + + /** + * Deletes a specified member from the ordered set. + * + * @param string $key + * @param string $member1 + * @param string $member2 + * @param string $memberN + * + * @return int Number of deleted values + * @link https://redis.io/commands/zrem + * @example + *
+     * $redisCluster->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
+     * $redisCluster->zRem('z', 'v2', 'v3');                           // int(2)
+     * var_dump( $redisCluster->zRange('z', 0, -1) );
+     * //// Output:
+     * //
+     * // array(2) {
+     * //   [0]=> string(2) "v1"
+     * //   [1]=> string(2) "v4"
+     * // }
+     * 
+ */ + public function zRem($key, $member1, $member2 = null, $memberN = null) { } + + /** + * Sort + * + * @param string $key + * @param array $option array(key => value, ...) - optional, with the following keys and values: + * - 'by' => 'some_pattern_*', + * - 'limit' => array(0, 1), + * - 'get' => 'some_other_pattern_*' or an array of patterns, + * - 'sort' => 'asc' or 'desc', + * - 'alpha' => TRUE, + * - 'store' => 'external-key' + * + * @return array + * An array of values, or a number corresponding to the number of elements stored if that was used. + * @link https://redis.io/commands/sort + * @example + *
+     * $redisCluster->del('s');
+     * $redisCluster->sadd('s', 5);
+     * $redisCluster->sadd('s', 4);
+     * $redisCluster->sadd('s', 2);
+     * $redisCluster->sadd('s', 1);
+     * $redisCluster->sadd('s', 3);
+     *
+     * var_dump($redisCluster->sort('s')); // 1,2,3,4,5
+     * var_dump($redisCluster->sort('s', array('sort' => 'desc'))); // 5,4,3,2,1
+     * var_dump($redisCluster->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5
+     * 
+ */ + public function sort($key, $option = null) { } + + /** + * Describes the object pointed to by a key. + * The information to retrieve (string) and the key (string). + * Info can be one of the following: + * - "encoding" + * - "refcount" + * - "idletime" + * + * @param string $string + * @param string $key + * + * @return string|false for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist. + * @link https://redis.io/commands/object + * @example + *
+     * $redisCluster->object("encoding", "l"); // → ziplist
+     * $redisCluster->object("refcount", "l"); // → 1
+     * $redisCluster->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds).
+     * 
+ */ + public function object($string = '', $key = '') { } + + /** + * Subscribe to channels. Warning: this function will probably change in the future. + * + * @param array $channels an array of channels to subscribe to + * @param string|array $callback either a string or an array($instance, 'method_name'). + * The callback function receives 3 parameters: the redis instance, the channel + * name, and the message. + * + * @return mixed Any non-null return value in the callback will be returned to the caller. + * @link https://redis.io/commands/subscribe + * @example + *
+     * function f($redisCluster, $chan, $msg) {
+     *  switch($chan) {
+     *      case 'chan-1':
+     *          ...
+     *          break;
+     *
+     *      case 'chan-2':
+     *                     ...
+     *          break;
+     *
+     *      case 'chan-2':
+     *          ...
+     *          break;
+     *      }
+     * }
+     *
+     * $redisCluster->subscribe(array('chan-1', 'chan-2', 'chan-3'), 'f'); // subscribe to 3 chans
+     * 
+ */ + public function subscribe($channels, $callback) { } + + /** + * Subscribe to channels by pattern + * + * @param array $patterns The number of elements removed from the set. + * @param string|array $callback Either a string or an array with an object and method. + * The callback will get four arguments ($redis, $pattern, $channel, $message) + * + * @return mixed Any non-null return value in the callback will be returned to the caller. + * + * @link https://redis.io/commands/psubscribe + * @example + *
+     * function psubscribe($redisCluster, $pattern, $chan, $msg) {
+     *  echo "Pattern: $pattern\n";
+     *  echo "Channel: $chan\n";
+     *  echo "Payload: $msg\n";
+     * }
+     * 
+ */ + public function psubscribe($patterns, $callback) { } + + /** + * Unsubscribes the client from the given channels, or from all of them if none is given. + * + * @param $channels + * @param $callback + */ + public function unSubscribe($channels, $callback) { } + + /** + * Unsubscribes the client from the given patterns, or from all of them if none is given. + * + * @param $channels + * @param $callback + */ + public function punSubscribe($channels, $callback) { } + + /** + * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. + * In order to run this command Redis will have to have already loaded the script, either by running it or via + * the SCRIPT LOAD command. + * + * @param string $scriptSha + * @param array $args + * @param int $numKeys + * + * @return mixed @see eval() + * @see eval() + * @link https://redis.io/commands/evalsha + * @example + *
+     * $script = 'return 1';
+     * $sha = $redisCluster->script('load', $script);
+     * $redisCluster->evalSha($sha); // Returns 1
+     * 
+ */ + public function evalSha($scriptSha, $args = array(), $numKeys = 0) { } + + /** + * Scan the keyspace for keys. + * + * @param int &$iterator Iterator, initialized to NULL. + * @param string|array $node Node identified by key or host/port array + * @param string $pattern Pattern to match. + * @param int $count Count of keys per iteration (only a suggestion to Redis). + * + * @return array|false This function will return an array of keys or FALSE if there are no more keys. + * @link https://redis.io/commands/scan + * @example + *
+     * $iterator = null;
+     * while($keys = $redisCluster->scan($iterator)) {
+     *     foreach($keys as $key) {
+     *         echo $key . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function scan(&$iterator, $node, $pattern = null, $count = 0) { } + + /** + * Scan a set for members. + * + * @param string $key The set to search. + * @param int $iterator LONG (reference) to the iterator as we go. + * @param null $pattern String, optional pattern to match against. + * @param int $count How many members to return at a time (Redis might return a different amount). + * + * @return array|false PHPRedis will return an array of keys or FALSE when we're done iterating. + * @link https://redis.io/commands/sscan + * @example + *
+     * $iterator = null;
+     * while ($members = $redisCluster->sScan('set', $iterator)) {
+     *     foreach ($members as $member) {
+     *         echo $member . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function sScan($key, &$iterator, $pattern = null, $count = 0) { } + + /** + * Scan a sorted set for members, with optional pattern and count. + * + * @param string $key String, the set to scan. + * @param int $iterator Long (reference), initialized to NULL. + * @param string $pattern String (optional), the pattern to match. + * @param int $count How many keys to return per iteration (Redis might return a different number). + * + * @return array|false PHPRedis will return matching keys from Redis, or FALSE when iteration is complete. + * @link https://redis.io/commands/zscan + * @example + *
+     * $iterator = null;
+     * while ($members = $redis-zscan('zset', $iterator)) {
+     *     foreach ($members as $member => $score) {
+     *         echo $member . ' => ' . $score . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function zScan($key, &$iterator, $pattern = null, $count = 0) { } + + /** + * Scan a HASH value for members, with an optional pattern and count. + * + * @param string $key + * @param int $iterator + * @param string $pattern Optional pattern to match against. + * @param int $count How many keys to return in a go (only a sugestion to Redis). + * + * @return array An array of members that match our pattern. + * @link https://redis.io/commands/hscan + * @example + *
+     * $iterator = null;
+     * while($elements = $redisCluster->hscan('hash', $iterator)) {
+     *    foreach($elements as $key => $value) {
+     *         echo $key . ' => ' . $value . PHP_EOL;
+     *     }
+     * }
+     * 
+ */ + public function hScan($key, &$iterator, $pattern = null, $count = 0) { } + + /** + * Detect whether we're in ATOMIC/MULTI/PIPELINE mode. + * + * @return int Either RedisCluster::ATOMIC, RedisCluster::MULTI or RedisCluster::PIPELINE + * @example $redisCluster->getMode(); + */ + public function getMode() { } + + /** + * The last error message (if any) + * + * @return string|null A string with the last returned script based error message, or NULL if there is no error + * @example + *
+     * $redisCluster->eval('this-is-not-lua');
+     * $err = $redisCluster->getLastError();
+     * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'"
+     * 
+ */ + public function getLastError() { } + + /** + * Clear the last error message + * + * @return bool true + * @example + *
+     * $redisCluster->set('x', 'a');
+     * $redisCluster->incr('x');
+     * $err = $redisCluster->getLastError();
+     * // "ERR value is not an integer or out of range"
+     * $redisCluster->clearLastError();
+     * $err = $redisCluster->getLastError();
+     * // NULL
+     * 
+ */ + public function clearLastError() { } + + /** + * Get client option + * + * @param string $name parameter name + * + * @return int Parameter value. + * @example + * // return RedisCluster::SERIALIZER_NONE, RedisCluster::SERIALIZER_PHP, or RedisCluster::SERIALIZER_IGBINARY. + * $redisCluster->getOption(RedisCluster::OPT_SERIALIZER); + */ + public function getOption($name) { } + + /** + * Set client option. + * + * @param string $name parameter name + * @param string $value parameter value + * + * @return bool TRUE on success, FALSE on error. + * @example + *
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_NONE);        // don't serialize data
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);         // use built-in serialize/unserialize
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_IGBINARY);    // use igBinary serialize/unserialize
+     * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'myAppName:');                             // use custom prefix on all keys
+     * 
+ */ + public function setOption($name, $value) { } + + /** + * A utility method to prefix the value with the prefix setting for phpredis. + * + * @param mixed $value The value you wish to prefix + * + * @return string If a prefix is set up, the value now prefixed. If there is no prefix, the value will be returned unchanged. + * @example + *
+     * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'my-prefix:');
+     * $redisCluster->_prefix('my-value'); // Will return 'my-prefix:my-value'
+     * 
+ */ + public function _prefix($value) { } + + /** + * A utility method to serialize values manually. This method allows you to serialize a value with whatever + * serializer is configured, manually. This can be useful for serialization/unserialization of data going in + * and out of EVAL commands as phpredis can't automatically do this itself. Note that if no serializer is + * set, phpredis will change Array values to 'Array', and Objects to 'Object'. + * + * @param mixed $value The value to be serialized. + * + * @return mixed + * @example + *
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_NONE);
+     * $redisCluster->_serialize("foo"); // returns "foo"
+     * $redisCluster->_serialize(Array()); // Returns "Array"
+     * $redisCluster->_serialize(new stdClass()); // Returns "Object"
+     *
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);
+     * $redisCluster->_serialize("foo"); // Returns 's:3:"foo";'
+     * 
+ */ + public function _serialize($value) { } + + /** + * A utility method to unserialize data with whatever serializer is set up. If there is no serializer set, the + * value will be returned unchanged. If there is a serializer set up, and the data passed in is malformed, an + * exception will be thrown. This can be useful if phpredis is serializing values, and you return something from + * redis in a LUA script that is serialized. + * + * @param string $value The value to be unserialized + * + * @return mixed + * @example + *
+     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);
+     * $redisCluster->_unserialize('a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}'); // Will return Array(1,2,3)
+     * 
+ */ + public function _unserialize($value) { } + + /** + * Return all redis master nodes + * + * @return array + * @example + *
+     * $redisCluster->_masters(); // Will return [[0=>'127.0.0.1','6379'],[0=>'127.0.0.1','6380']]
+     * 
+ */ + public function _masters() { } + + /** + * Enter and exit transactional mode. + * + * @param int $mode RedisCluster::MULTI|RedisCluster::PIPELINE + * Defaults to RedisCluster::MULTI. + * A RedisCluster::MULTI block of commands runs as a single transaction; + * a RedisCluster::PIPELINE block is simply transmitted faster to the server, but without any guarantee + * of atomicity. discard cancels a transaction. + * + * @return Redis returns the Redis instance and enters multi-mode. + * Once in multi-mode, all subsequent method calls return the same object until exec() is called. + * @link https://redis.io/commands/multi + * @example + *
+     * $ret = $redisCluster->multi()
+     *      ->set('key1', 'val1')
+     *      ->get('key1')
+     *      ->set('key2', 'val2')
+     *      ->get('key2')
+     *      ->exec();
+     *
+     * //$ret == array (
+     * //    0 => TRUE,
+     * //    1 => 'val1',
+     * //    2 => TRUE,
+     * //    3 => 'val2');
+     * 
+ */ + public function multi($mode = RedisCluster::MULTI) { } + + /** + * @see multi() + * @return void|array + * @link https://redis.io/commands/exec + */ + public function exec() { } + + /** + * @see multi() + * @link https://redis.io/commands/discard + */ + public function discard() { } + + /** + * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC, + * the MULTI/EXEC transaction will fail (return FALSE). unwatch cancels all the watching of all keys by this client. + * + * @param string|array $key : a list of keys + * + * @return void + * @link https://redis.io/commands/watch + * @example + *
+     * $redisCluster->watch('x');
+     * // long code here during the execution of which other clients could well modify `x`
+     * $ret = $redisCluster->multi()
+     *          ->incr('x')
+     *          ->exec();
+     * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC.
+     * 
+ */ + public function watch($key) { } + + /** + * @see watch() + * @link https://redis.io/commands/unwatch + */ + public function unwatch() { } + + /** + * Performs a synchronous save at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return bool TRUE in case of success, FALSE in case of failure. + * If a save is already running, this command will fail and return FALSE. + * @link https://redis.io/commands/save + * @example + * $redisCluster->save('x'); //key + * $redisCluster->save(['127.0.0.1',6379]); //[host,port] + */ + public function save($nodeParams) { } + + /** + * Performs a background save at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return bool TRUE in case of success, FALSE in case of failure. + * If a save is already running, this command will fail and return FALSE. + * @link https://redis.io/commands/bgsave + */ + public function bgsave($nodeParams) { } + + /** + * Removes all entries from the current database at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return bool Always TRUE. + * @link https://redis.io/commands/flushdb + */ + public function flushDB($nodeParams) { } + + /** + * Removes all entries from all databases at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return bool Always TRUE. + * @link https://redis.io/commands/flushall + */ + public function flushAll($nodeParams) { } + + /** + * Returns the current database's size at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return int DB size, in number of keys. + * @link https://redis.io/commands/dbsize + * @example + *
+     * $count = $redisCluster->dbSize('x');
+     * echo "Redis has $count keys\n";
+     * 
+ */ + public function dbSize($nodeParams) { } + + /** + * Starts the background rewrite of AOF (Append-Only File) at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return bool TRUE in case of success, FALSE in case of failure. + * @link https://redis.io/commands/bgrewriteaof + * @example $redisCluster->bgrewriteaof('x'); + */ + public function bgrewriteaof($nodeParams) { } + + /** + * Returns the timestamp of the last disk save at a specific node. + * + * @param string|array $nodeParams key or [host,port] + * + * @return int timestamp. + * @link https://redis.io/commands/lastsave + * @example $redisCluster->lastSave('x'); + */ + public function lastSave($nodeParams) { } + + /** + * Returns an associative array of strings and integers + * + * @param string $option Optional. The option to provide redis. + * SERVER | CLIENTS | MEMORY | PERSISTENCE | STATS | REPLICATION | CPU | CLASTER | KEYSPACE + * | COMANDSTATS + * + * Returns an associative array of strings and integers, with the following keys: + * - redis_version + * - redis_git_sha1 + * - redis_git_dirty + * - redis_build_id + * - redis_mode + * - os + * - arch_bits + * - multiplexing_api + * - atomicvar_api + * - gcc_version + * - process_id + * - run_id + * - tcp_port + * - uptime_in_seconds + * - uptime_in_days + * - hz + * - lru_clock + * - executable + * - config_file + * - connected_clients + * - client_longest_output_list + * - client_biggest_input_buf + * - blocked_clients + * - used_memory + * - used_memory_human + * - used_memory_rss + * - used_memory_rss_human + * - used_memory_peak + * - used_memory_peak_human + * - used_memory_peak_perc + * - used_memory_peak + * - used_memory_overhead + * - used_memory_startup + * - used_memory_dataset + * - used_memory_dataset_perc + * - total_system_memory + * - total_system_memory_human + * - used_memory_lua + * - used_memory_lua_human + * - maxmemory + * - maxmemory_human + * - maxmemory_policy + * - mem_fragmentation_ratio + * - mem_allocator + * - active_defrag_running + * - lazyfree_pending_objects + * - mem_fragmentation_ratio + * - loading + * - rdb_changes_since_last_save + * - rdb_bgsave_in_progress + * - rdb_last_save_time + * - rdb_last_bgsave_status + * - rdb_last_bgsave_time_sec + * - rdb_current_bgsave_time_sec + * - rdb_last_cow_size + * - aof_enabled + * - aof_rewrite_in_progress + * - aof_rewrite_scheduled + * - aof_last_rewrite_time_sec + * - aof_current_rewrite_time_sec + * - aof_last_bgrewrite_status + * - aof_last_write_status + * - aof_last_cow_size + * - changes_since_last_save + * - aof_current_size + * - aof_base_size + * - aof_pending_rewrite + * - aof_buffer_length + * - aof_rewrite_buffer_length + * - aof_pending_bio_fsync + * - aof_delayed_fsync + * - loading_start_time + * - loading_total_bytes + * - loading_loaded_bytes + * - loading_loaded_perc + * - loading_eta_seconds + * - total_connections_received + * - total_commands_processed + * - instantaneous_ops_per_sec + * - total_net_input_bytes + * - total_net_output_bytes + * - instantaneous_input_kbps + * - instantaneous_output_kbps + * - rejected_connections + * - maxclients + * - sync_full + * - sync_partial_ok + * - sync_partial_err + * - expired_keys + * - evicted_keys + * - keyspace_hits + * - keyspace_misses + * - pubsub_channels + * - pubsub_patterns + * - latest_fork_usec + * - migrate_cached_sockets + * - slave_expires_tracked_keys + * - active_defrag_hits + * - active_defrag_misses + * - active_defrag_key_hits + * - active_defrag_key_misses + * - role + * - master_replid + * - master_replid2 + * - master_repl_offset + * - second_repl_offset + * - repl_backlog_active + * - repl_backlog_size + * - repl_backlog_first_byte_offset + * - repl_backlog_histlen + * - master_host + * - master_port + * - master_link_status + * - master_last_io_seconds_ago + * - master_sync_in_progress + * - slave_repl_offset + * - slave_priority + * - slave_read_only + * - master_sync_left_bytes + * - master_sync_last_io_seconds_ago + * - master_link_down_since_seconds + * - connected_slaves + * - min-slaves-to-write + * - min-replicas-to-write + * - min_slaves_good_slaves + * - used_cpu_sys + * - used_cpu_user + * - used_cpu_sys_children + * - used_cpu_user_children + * - cluster_enabled + * + * @link https://redis.io/commands/info + * @return array + * @example + *
+     * $redisCluster->info();
+     *
+     * or
+     *
+     * $redisCluster->info("COMMANDSTATS"); //Information on the commands that have been run (>=2.6 only)
+     * $redisCluster->info("CPU"); // just CPU information from Redis INFO
+     * 
+ */ + public function info($option = null) { } + + /** + * @since redis >= 2.8.12. + * Returns the role of the instance in the context of replication + * + * @param string|array $nodeParams key or [host,port] + * + * @return array + * @link https://redis.io/commands/role + * @example + *
+     * $redisCluster->role(['127.0.0.1',6379]);
+     * // [ 0=>'master',1 => 3129659, 2 => [ ['127.0.0.1','9001','3129242'], ['127.0.0.1','9002','3129543'] ] ]
+     * 
+ */ + public function role($nodeParams) { } + + /** + * Returns a random key at the specified node + * + * @param string|array $nodeParams key or [host,port] + * + * @return string an existing key in redis. + * @link https://redis.io/commands/randomkey + * @example + *
+     * $key = $redisCluster->randomKey('x');
+     * $surprise = $redisCluster->get($key);  // who knows what's in there.
+     * 
+ */ + public function randomKey($nodeParams) { } + + /** + * Return the specified node server time. + * + * @param string|array $nodeParams key or [host,port] + * + * @return array If successfully, the time will come back as an associative array with element zero being the + * unix timestamp, and element one being microseconds. + * @link https://redis.io/commands/time + * @example + *
+     * var_dump( $redisCluster->time('x') );
+     * //// Output:
+     * //
+     * // array(2) {
+     * //   [0] => string(10) "1342364352"
+     * //   [1] => string(6) "253002"
+     * // }
+     * 
+ */ + public function time($nodeParams) { } + + /** + * Check the specified node status + * + * @param string|array $nodeParams key or [host,port] + * + * @return string STRING: +PONG on success. Throws a RedisException object on connectivity error, as described + * above. + * @link https://redis.io/commands/ping + */ + public function ping($nodeParams) { } + + /** + * Returns message. + * + * @param string|array $nodeParams key or [host,port] + * @param string $msg + * + * @return mixed + */ + public function echo ($nodeParams, $msg) { } + + /** + * Returns Array reply of details about all Redis Cluster commands. + * + * @return mixed array | bool + */ + public function command() { } + + /** + * Send arbitrary things to the redis server at the specified node + * + * @param string|array $nodeParams key or [host,port] + * @param string $command Required command to send to the server. + * @param mixed $arguments Optional variable amount of arguments to send to the server. + * + * @return mixed + */ + public function rawCommand($nodeParams, $command, $arguments) { } + + /** + * @since redis >= 3.0 + * Executes cluster command + * + * @param string|array $nodeParams key or [host,port] + * @param string $command Required command to send to the server. + * @param mixed $arguments Optional variable amount of arguments to send to the server. + * + * @return mixed + * @link https://redis.io/commands#cluster + * @example + *
+     * $redisCluster->cluster(['127.0.0.1',6379],'INFO');
+     * 
+ */ + public function cluster($nodeParams, $command, $arguments) { } + + /** + * Allows you to get information of the cluster client + * + * @param string|array $nodeParams key or [host,port] + * @param string $subCmd can be: 'LIST', 'KILL', 'GETNAME', or 'SETNAME' + * @param string $args optional arguments + */ + public function client($nodeParams, $subCmd, $args) { } + + /** + * Get or Set the redis config keys. + * + * @param string|array $nodeParams key or [host,port] + * @param string $operation either `GET` or `SET` + * @param string $key for `SET`, glob-pattern for `GET`. See https://redis.io/commands/config-get for examples. + * @param string $value optional string (only for `SET`) + * + * @return array Associative array for `GET`, key -> value + * @link https://redis.io/commands/config-get + * @link https://redis.io/commands/config-set + * @example + *
+     * $redisCluster->config(['127.0.0.1',6379], "GET", "*max-*-entries*");
+     * $redisCluster->config(['127.0.0.1',6379], "SET", "dir", "/var/run/redis/dumps/");
+     * 
+ */ + public function config($nodeParams, $operation, $key, $value) { } + + /** + * A command allowing you to get information on the Redis pub/sub system. + * + * @param string|array $nodeParams key or [host,port] + * + * @param string $keyword String, which can be: "channels", "numsub", or "numpat" + * @param string|array $argument Optional, variant. + * For the "channels" subcommand, you can pass a string pattern. + * For "numsub" an array of channel names + * + * @return array|int Either an integer or an array. + * - channels Returns an array where the members are the matching channels. + * - numsub Returns a key/value array where the keys are channel names and + * values are their counts. + * - numpat Integer return containing the number active pattern subscriptions. + * @link https://redis.io/commands/pubsub + * @example + *
+     * $redisCluster->pubsub(['127.0.0.1',6379], 'channels'); // All channels
+     * $redisCluster->pubsub(['127.0.0.1',6379], 'channels', '*pattern*'); // Just channels matching your pattern
+     * $redisCluster->pubsub(['127.0.0.1',6379], 'numsub', array('chan1', 'chan2')); // Get subscriber counts for
+     * 'chan1' and 'chan2'
+     * $redisCluster->pubsub(['127.0.0.1',6379], 'numpat'); // Get the number of pattern subscribers
+     * 
+ */ + public function pubsub($nodeParams, $keyword, $argument) { } + + /** + * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem. + * + * @param string|array $nodeParams key or [host,port] + * @param string $command load | flush | kill | exists + * @param string $script + * + * @return mixed + * @link https://redis.io/commands/script-load + * @link https://redis.io/commands/script-kill + * @link https://redis.io/commands/script-flush + * @link https://redis.io/commands/script-exists + * @example + *
+     * $redisCluster->script(['127.0.0.1',6379], 'load', $script);
+     * $redisCluster->script(['127.0.0.1',6379], 'flush');
+     * $redisCluster->script(['127.0.0.1',6379], 'kill');
+     * $redisCluster->script(['127.0.0.1',6379], 'exists', $script1, [$script2, $script3, ...]);
+     * 
+ * + * SCRIPT LOAD will return the SHA1 hash of the passed script on success, and FALSE on failure. + * SCRIPT FLUSH should always return TRUE + * SCRIPT KILL will return true if a script was able to be killed and false if not + * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script + */ + public function script($nodeParams, $command, $script) { } + + /** + * This function is used in order to read and reset the Redis slow queries log. + * + * @param string|array $nodeParams key or [host,port] + * @param string $command + * @param mixed $argument + * + * @link https://redis.io/commands/slowlog + * @example + *
+     * $redisCluster->slowLog(['127.0.0.1',6379],'get','2');
+     * 
+ */ + public function slowLog($nodeParams, $command, $argument) { } + + /** + * Add one or more geospatial items in the geospatial index represented using a sorted set + * + * @param string $key + * @param float $longitude + * @param float $latitude + * @param string $member + * + * @link https://redis.io/commands/geoadd + * @example + *
+     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
+     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
+     * 
+ */ + public function geoAdd($key, $longitude, $latitude, $member) { } + + /** + * Returns members of a geospatial index as standard geohash strings + * + * @param $key string + * @param $member1 string + * @param $member2 string + * @param $memberN string + * + * @example + *
+     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
+     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
+     * $redisCluster->geohash('Sicily','Palermo','Catania');//['sqc8b49rny0','sqdtr74hyu0']
+     * 
+ */ + public function geohash($key, $member1, $member2 = null, $memberN = null) { } + + /** + * Returns longitude and latitude of members of a geospatial index + * + * @param $key string + * @param $member1 string + * @param $member2 string + * @param $memberN string + * + * @example + *
+     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
+     * $redisCluster->geopos('Sicily','Palermo');//[['13.36138933897018433','38.11555639549629859']]
+     * 
+ */ + public function geopos($key, $member1, $member2 = null, $memberN = null) { } + + /** + * + * Returns the distance between two members of a geospatial index + * + * @param string $key + * @param string $member1 + * @param string $member2 + * @param string $unit The unit must be one of the following, and defaults to meters: + * m for meters. + * km for kilometers. + * mi for miles. + * ft for feet. + * + * @link https://redis.io/commands/geoadd + * @example + *
+     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
+     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
+     * $redisCluster->geoDist('Sicily', 'Palermo' ,'Catania'); // float(166274.1516)
+     * $redisCluster->geoDist('Sicily', 'Palermo','Catania', 'km'); // float(166.2742)
+     * 
+ */ + public function geoDist($key, $member1, $member2, $unit = 'm') { } + + /** + * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point + * + * @param string $key + * @param float $longitude + * @param float $latitude + * @param float $radius + * @param string $radiusUnit String can be: "m" for meters; "km" for kilometers , "mi" for miles, or "ft" for feet. + * @param array $options + * + * @link https://redis.io/commands/georadius + * @example + *
+     * $redisCluster->del('Sicily');
+     * $redisCluster->geoAdd('Sicily', 12.361389, 35.115556, 'Palermo'); // int(1)
+     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
+     * $redisCluster->geoAdd('Sicily', 13.3585, 35.330022, "Agrigento"); // int(1)
+     *
+     * var_dump( $redisCluster->geoRadius('Sicily',13.3585, 35.330022, 300, 'km', ['WITHDIST' ,'DESC']) );
+     *
+     * array(3) {
+     *    [0]=>
+     *   array(2) {
+     *        [0]=>
+     *     string(7) "Catania"
+     *        [1]=>
+     *     string(8) "286.9362"
+     *   }
+     *   [1]=>
+     *   array(2) {
+     *        [0]=>
+     *     string(7) "Palermo"
+     *        [1]=>
+     *     string(7) "93.6874"
+     *   }
+     *   [2]=>
+     *   array(2) {
+     *        [0]=>
+     *     string(9) "Agrigento"
+     *        [1]=>
+     *     string(6) "0.0002"
+     *   }
+     * }
+     * var_dump( $redisCluster->geoRadiusByMember('Sicily','Agrigento', 100, 'km', ['WITHDIST' ,'DESC']) );
+     *
+     * * array(2) {
+     *    [0]=>
+     *   array(2) {
+     *        [0]=>
+     *     string(7) "Palermo"
+     *        [1]=>
+     *     string(7) "93.6872"
+     *   }
+     *   [1]=>
+     *   array(2) {
+     *        [0]=>
+     *     string(9) "Agrigento"
+     *        [1]=>
+     *     string(6) "0.0000"
+     *   }
+     * }
+     *
+     * 
+     */
+    public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) { }
+
+    /**
+     * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member
+     *
+     * @see geoRadius
+     *
+     * @param string $key
+     * @param string $member
+     * @param float  $radius
+     * @param string $radiusUnit
+     * @param array  $options
+     */
+    public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) { }
+
+}
+
+class RedisClusterException extends Exception {}
diff --git a/psalm.xml b/psalm.xml
new file mode 100644
index 00000000000..47825b31648
--- /dev/null
+++ b/psalm.xml
@@ -0,0 +1,38 @@
+
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+			
+			
+			
+			
+		
+	
+	
+		
+	
+	
+		
+		
+		
+		
+		
+	
+
-- 
2.39.5