fix: Change typehint to RedisArray

This commit is contained in:
Michael Telgmann
2025-10-31 08:40:18 +01:00
committed by Michael Grunder
parent 9c9d0286f4
commit b742bb8bdb
3 changed files with 245 additions and 245 deletions
+57 -57
View File
@@ -594,8 +594,8 @@ class Redis {
* Unpack the provided value with the configured compressor and serializer
* as set with Redis::setOption().
*
* @param string $value The value which has been serialized and compressed.
* @return mixed The uncompressed and eserialized value.
* @param string $value The value which has been serialized and compressed.
* @return mixed The uncompressed and eserialized value.
*
*/
public function _unpack(string $value): mixed;
@@ -982,9 +982,9 @@ class Redis {
* of keys to delete, and the second is to pass N arguments, all names of keys. See
* below for an example of both strategies.
*
* @param array|string $key Either an array with one or more key names or a string with
* the name of a key.
* @param string ...$other_keys One or more additional keys passed in a variadic fashion.
* @param array|string $key Either an array with one or more key names or a string with
* the name of a key.
* @param string $other_keys One or more additional keys passed in a variadic fashion.
*
* @return Redis|int|false The number of keys that were deleted
*
@@ -1280,7 +1280,7 @@ class Redis {
* 'FLUSH' - Delete all the libraries
* 'DUMP' - Return a serialized payload representing the current libraries
* 'RESTORE' - Restore the libraries represented by the given payload
* @param mixed ...$args Additional arguments
* @param mixed $args Additional arguments
*
* @return Redis|bool|string|array Depends on subcommand.
*
@@ -1291,12 +1291,12 @@ class Redis {
/**
* Add one or more members to a geospacial sorted set
*
* @param string $key The sorted set to add data to.
* @param float $lng The longitude of the first member
* @param float $lat The latitude of the first member.
* @param mixed ...$other_triples_and_options You can continue to pass longitude, latitude, and member
* arguments to add as many members as you wish. Optionally, the final argument may be
* a string with options for the command @see Redis documentation for the options.
* @param string $key The sorted set to add data to.
* @param float $lng The longitude of the first member
* @param float $lat The latitude of the first member.
* @param mixed $other_triples_and_options You can continue to pass longitude, latitude, and member
* arguments to add as many members as you wish. Optionally, the final argument may be
* a string with options for the command @see Redis documentation for the options.
*
* @return Redis|int|false The number of added elements is returned. If the 'CH' option is specified,
* the return value is the number of members *changed*.
@@ -1335,9 +1335,9 @@ class Redis {
/**
* Retrieve one or more GeoHash encoded strings for members of the set.
*
* @param string $key The key to query
* @param string $member The first member to request
* @param string ...$other_members One or more additional members to request.
* @param string $key The key to query
* @param string $member The first member to request
* @param string $other_members One or more additional members to request.
*
* @return Redis|array|false An array of GeoHash encoded values.
*
@@ -1351,9 +1351,9 @@ class Redis {
/**
* Return the longitude and latitude for one or more members of a geospacially encoded sorted set.
*
* @param string $key The set to query.
* @param string $member The first member to query.
* @param string ...$other_members One or more members to query.
* @param string $key The set to query.
* @param string $member The first member to query.
* @param string $other_members One or more members to query.
*
* @return Redis|array|false An array of longitude and latitude pairs.
*
@@ -1716,9 +1716,9 @@ class Redis {
/**
* Remove one or more fields from a hash.
*
* @param string $key The hash key in question.
* @param string $field The first field to remove
* @param string ...$other_fields One or more additional fields to remove.
* @param string $key The hash key in question.
* @param string $field The first field to remove
* @param string $other_fields One or more additional fields to remove.
*
* @return Redis|int|false The number of fields actually removed.
*
@@ -2210,7 +2210,7 @@ class Redis {
*
* @see https://redis.io/commands/info/
*
* @param string ...$sections Optional section(s) you wish Redis server to return.
* @param string $sections Optional section(s) you wish Redis server to return.
*
* @return Redis|array|false
*/
@@ -2861,9 +2861,9 @@ class Redis {
/**
* Add one or more values to a Redis SET key.
*
* @param string $key The key name
* @param mixed $value A value to add to the set.
* @param mixed ...$other_values One or more additional values to add
* @param string $key The key name
* @param mixed $value A value to add to the set.
* @param mixed $other_values One or more additional values to add
*
* @return Redis|int|false The number of values added to the set.
*
@@ -2901,8 +2901,8 @@ class Redis {
* Given one or more Redis SETS, this command returns all of the members from the first
* set that are not in any subsequent set.
*
* @param string $key The first set
* @param string ...$other_keys One or more additional sets
* @param string $key The first set
* @param string $other_keys One or more additional sets
*
* @return Redis|array|false Returns the elements from keys 2..N that don't exist in the
* first sorted set, or false on failure.
@@ -2928,9 +2928,9 @@ class Redis {
* @see https://redis.io/commands/sdiffstore
* @see Redis::sdiff()
*
* @param string $dst The key where to store the result
* @param string $key The first key to perform the DIFF on
* @param string ...$other_keys One or more additional keys.
* @param string $dst The key where to store the result
* @param string $key The first key to perform the DIFF on
* @param string $other_keys One or more additional keys.
*
* @return Redis|int|false The number of values stored in the destination set or false on failure.
*/
@@ -2942,8 +2942,8 @@ class Redis {
*
* @see https://redis.io/commands/sinter
*
* @param array|string $key The first SET key to intersect.
* @param string ...$other_keys One or more Redis SET keys.
* @param array|string $key The first SET key to intersect.
* @param string $other_keys One or more Redis SET keys.
*
* @example
* <code>
@@ -2985,13 +2985,13 @@ class Redis {
* Perform the intersection of one or more Redis SETs, storing the result in a destination
* key, rather than returning them.
*
* @param array|string $key Either a string key, or an array of keys (with at least two
* elements, consisting of the destination key name and one
* or more source keys names.
* @param string ...$other_keys If the first argument was a string, subsequent arguments should
* be source key names.
* @param array|string $key Either a string key, or an array of keys (with at least two
* elements, consisting of the destination key name and one
* or more source keys names.
* @param string $other_keys If the first argument was a string, subsequent arguments should
* be source key names.
*
* @return Redis|int|false The number of values stored in the destination key or false on failure.
* @return Redis|int|false The number of values stored in the destination key or false on failure.
*
* @see https://redis.io/commands/sinterstore
* @see Redis::sinter()
@@ -3024,9 +3024,9 @@ class Redis {
* @see https://redis.io/commands/smember
* @see Redis::smember()
*
* @param string $key The set to query.
* @param string $member The first value to test if exists in the set.
* @param string ...$other_members Any number of additional values to check.
* @param string $key The set to query.
* @param string $member The first value to test if exists in the set.
* @param string $other_members Any number of additional values to check.
*
* @return Redis|array|false An array of integers representing whether each passed value
* was a member of the set.
@@ -3101,8 +3101,8 @@ class Redis {
*
* @see https://redis.io/commands/sunion
*
* @param string $key The first SET to do a union with
* @param string ...$other_keys One or more subsequent keys
* @param string $key The first SET to do a union with
* @param string $other_keys One or more subsequent keys
*
* @return Redis|array|false The union of the one or more input sets or false on failure.
*
@@ -3116,9 +3116,9 @@ class Redis {
* @see https://redis.io/commands/sunionstore
* @see Redis::sunion()
*
* @param string $dst The destination key
* @param string $key The first source key
* @param string ...$other_keys One or more additional source keys
* @param string $dst The destination key
* @param string $key The first source key
* @param string $other_keys One or more additional source keys
*
* @return Redis|int|false The number of elements stored in the destination SET or
* false on failure.
@@ -3422,7 +3422,7 @@ class Redis {
*
* @param array|string $key_or_array Either the first key or if passed as the only argument
* an array of keys.
* @param string ...$more_keys One or more keys to send to the command.
* @param string $more_keys One or more keys to send to the command.
*
* @return Redis|int|false This command returns the number of keys that exist and
* had their last modified time reset
@@ -3518,9 +3518,9 @@ class Redis {
*
* @see https://redis.io/commands/srem
*
* @param string $key The Redis SET key in question.
* @param mixed $value The first value to remove.
* @param mixed ...$other_values One or more additional values to remove.
* @param string $key The Redis SET key in question.
* @param mixed $value The first value to remove.
* @param mixed $other_values One or more additional values to remove.
*
* @return Redis|int|false The number of values removed from the set or false on failure.
*
@@ -3765,10 +3765,10 @@ class Redis {
* deletion is asynchronous, meaning it is safe to delete large keys without fear of
* Redis blocking for a long period of time.
*
* @param array|string $key Either an array with one or more keys or a string with
* the first key to delete.
* @param string ...$other_keys If the first argument passed to this method was a string
* you may pass any number of additional key names.
* @param array|string $key Either an array with one or more keys or a string with
* the first key to delete.
* @param string $other_keys If the first argument passed to this method was a string
* you may pass any number of additional key names.
*
* @return Redis|int|false The number of keys deleted or false on failure.
*
@@ -3818,9 +3818,9 @@ class Redis {
/**
* Watch one or more keys for conditional execution of a transaction.
*
* @param array|string $key Either an array with one or more key names, or a string key name
* @param string ...$other_keys If the first argument was passed as a string, any number of additional
* string key names may be passed variadically.
* @param array|string $key Either an array with one or more key names, or a string key name
* @param string $other_keys If the first argument was passed as a string, any number of additional
* string key names may be passed variadically.
*
* @return Redis|bool
*
+187 -187
View File
@@ -8,66 +8,66 @@
/**
* @method mixed acl(string $subcmd, string ...$args)
* @method Redis|int|false append(string $key, mixed $value)
* @method Redis|bool auth(#[\SensitiveParameter] mixed $credentials)
* @method Redis|bool bgrewriteaof()
* @method Redis|array|false waitaof(int $numlocal, int $numreplicas, int $timeout)
* @method Redis|int|false bitcount(string $key, int $start = 0, int $end = -1, bool $bybit = false)
* @method Redis|int|false bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)
* @method Redis|int|false bitpos(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
* @method Redis|array|null|false blPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
* @method Redis|array|null|false brPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
* @method Redis|string|false brpoplpush(string $src, string $dst, int|float $timeout)
* @method Redis|array|false bzPopMax(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method Redis|array|false bzPopMin(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method Redis|array|null|false bzmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method Redis|array|null|false zmpop(array $keys, string $from, int $count = 1)
* @method Redis|array|null|false blmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method Redis|array|null|false lmpop(array $keys, string $from, int $count = 1)
* @method RedisArray|int|false append(string $key, mixed $value)
* @method RedisArray|bool auth(#[\SensitiveParameter] mixed $credentials)
* @method RedisArray|bool bgrewriteaof()
* @method RedisArray|array|false waitaof(int $numlocal, int $numreplicas, int $timeout)
* @method RedisArray|int|false bitcount(string $key, int $start = 0, int $end = -1, bool $bybit = false)
* @method RedisArray|int|false bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)
* @method RedisArray|int|false bitpos(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
* @method RedisArray|array|null|false blPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
* @method RedisArray|array|null|false brPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
* @method RedisArray|string|false brpoplpush(string $src, string $dst, int|float $timeout)
* @method RedisArray|array|false bzPopMax(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method RedisArray|array|false bzPopMin(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method RedisArray|array|null|false bzmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method RedisArray|array|null|false zmpop(array $keys, string $from, int $count = 1)
* @method RedisArray|array|null|false blmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method RedisArray|array|null|false lmpop(array $keys, string $from, int $count = 1)
* @method bool clearLastError()
* @method mixed client(string $opt, mixed ...$args)
* @method bool close()
* @method mixed command(?string $opt = null, mixed ...$args)
* @method mixed config(string $operation, array|string|null $key_or_settings = null, ?string $value = null)
* @method Redis|bool copy(string $src, string $dst, ?array $options = null)
* @method Redis|int|false dbSize()
* @method Redis|string debug(string $key)
* @method Redis|int|false decr(string $key, int $by = 1)
* @method Redis|int|false decrBy(string $key, int $value)
* @method Redis|int|false delifeq(string $key, mixed $value)
* @method Redis|int|false delete(array|string $key, string ...$other_keys)
* @method Redis|string|false dump(string $key)
* @method Redis|string|false echo(string $str)
* @method RedisArray|bool copy(string $src, string $dst, ?array $options = null)
* @method RedisArray|int|false dbSize()
* @method RedisArray|string debug(string $key)
* @method RedisArray|int|false decr(string $key, int $by = 1)
* @method RedisArray|int|false decrBy(string $key, int $value)
* @method RedisArray|int|false delifeq(string $key, mixed $value)
* @method RedisArray|int|false delete(array|string $key, string ...$other_keys)
* @method RedisArray|string|false dump(string $key)
* @method RedisArray|string|false echo(string $str)
* @method mixed eval(string $script, array $args = [], int $num_keys = 0)
* @method mixed eval_ro(string $script_sha, array $args = [], int $num_keys = 0)
* @method mixed evalsha(string $sha1, array $args = [], int $num_keys = 0)
* @method mixed evalsha_ro(string $sha1, array $args = [], int $num_keys = 0)
* @method Redis|int|bool exists(mixed $key, mixed ...$other_keys)
* @method Redis|bool expire(string $key, int $timeout, ?string $mode = null)
* @method Redis|bool expireAt(string $key, int $timestamp, ?string $mode = null)
* @method Redis|bool failover(?array $to = null, bool $abort = false, int $timeout = 0)
* @method Redis|int|false expiretime(string $key)
* @method Redis|int|false pexpiretime(string $key)
* @method RedisArray|int|bool exists(mixed $key, mixed ...$other_keys)
* @method RedisArray|bool expire(string $key, int $timeout, ?string $mode = null)
* @method RedisArray|bool expireAt(string $key, int $timestamp, ?string $mode = null)
* @method RedisArray|bool failover(?array $to = null, bool $abort = false, int $timeout = 0)
* @method RedisArray|int|false expiretime(string $key)
* @method RedisArray|int|false pexpiretime(string $key)
* @method mixed fcall(string $fn, array $keys = [], array $args = [])
* @method mixed fcall_ro(string $fn, array $keys = [], array $args = [])
* @method Redis|bool|string|array function(string $operation, mixed ...$args)
* @method Redis|int|false geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
* @method Redis|float|false geodist(string $key, string $src, string $dst, ?string $unit = null)
* @method Redis|array|false geohash(string $key, string $member, string ...$other_members)
* @method Redis|array|false geopos(string $key, string $member, string ...$other_members)
* @method RedisArray|bool|string|array function(string $operation, mixed ...$args)
* @method RedisArray|int|false geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
* @method RedisArray|float|false geodist(string $key, string $src, string $dst, ?string $unit = null)
* @method RedisArray|array|false geohash(string $key, string $member, string ...$other_members)
* @method RedisArray|array|false geopos(string $key, string $member, string ...$other_members)
* @method mixed georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
* @method mixed georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
* @method mixed georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = [])
* @method mixed georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = [])
* @method array geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
* @method Redis|array|int|false geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
* @method RedisArray|array|int|false geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
* @method mixed get(string $key)
* @method Redis|array|false getWithMeta(string $key)
* @method RedisArray|array|false getWithMeta(string $key)
* @method mixed getAuth()
* @method Redis|int|false getBit(string $key, int $idx)
* @method Redis|string|bool getEx(string $key, array $options = [])
* @method RedisArray|int|false getBit(string $key, int $idx)
* @method RedisArray|string|bool getEx(string $key, array $options = [])
* @method int getDBNum()
* @method Redis|string|bool getDel(string $key)
* @method RedisArray|string|bool getDel(string $key)
* @method string getHost()
* @method string|null getLastError()
* @method int getMode()
@@ -75,112 +75,112 @@
* @method int getPort()
* @method string|false serverName()
* @method string|false serverVersion()
* @method Redis|string|false getRange(string $key, int $start, int $end)
* @method Redis|string|array|int|false lcs(string $key1, string $key2, ?array $options = null)
* @method RedisArray|string|false getRange(string $key, int $start, int $end)
* @method RedisArray|string|array|int|false lcs(string $key1, string $key2, ?array $options = null)
* @method float getReadTimeout()
* @method Redis|string|false getset(string $key, mixed $value)
* @method RedisArray|string|false getset(string $key, mixed $value)
* @method float|false getTimeout()
* @method array getTransferredBytes()
* @method void clearTransferredBytes()
* @method Redis|int|false hDel(string $key, string $field, string ...$other_fields)
* @method Redis|bool hExists(string $key, string $field)
* @method RedisArray|int|false hDel(string $key, string $field, string ...$other_fields)
* @method RedisArray|bool hExists(string $key, string $field)
* @method mixed hGet(string $key, string $member)
* @method Redis|array|false hGetAll(string $key)
* @method RedisArray|array|false hGetAll(string $key)
* @method mixed hGetWithMeta(string $key, string $member)
* @method Redis|int|false hIncrBy(string $key, string $field, int $value)
* @method Redis|float|false hIncrByFloat(string $key, string $field, float $value)
* @method Redis|array|false hKeys(string $key)
* @method Redis|int|false hLen(string $key)
* @method Redis|array|false hMget(string $key, array $fields)
* @method Redis|array|false hgetex(string $key, array $fields, string|array|null $expiry = null)
* @method Redis|int|false hsetex(string $key, array $fields, ?array $expiry = null)
* @method Redis|array|false hgetdel(string $key, array $fields)
* @method Redis|bool hMset(string $key, array $fieldvals)
* @method Redis|string|array|false hRandField(string $key, ?array $options = null)
* @method Redis|int|false hSet(string $key, mixed ...$fields_and_vals)
* @method Redis|bool hSetNx(string $key, string $field, mixed $value)
* @method Redis|int|false hStrLen(string $key, string $field)
* @method Redis|array|false hVals(string $key)
* @method Redis|array|false httl(string $key, array $fields)
* @method Redis|array|false hpttl(string $key, array $fields)
* @method Redis|array|false hexpiretime(string $key, array $fields)
* @method Redis|array|false hpexpiretime(string $key, array $fields)
* @method Redis|array|false hpersist(string $key, array $fields)
* @method Redis|int|false expiremember(string $key, string $field, int $ttl, ?string $unit = null)
* @method Redis|int|false expirememberat(string $key, string $field, int $timestamp)
* @method Redis|int|false incr(string $key, int $by = 1)
* @method Redis|int|false incrBy(string $key, int $value)
* @method Redis|float|false incrByFloat(string $key, float $value)
* @method RedisArray|int|false hIncrBy(string $key, string $field, int $value)
* @method RedisArray|float|false hIncrByFloat(string $key, string $field, float $value)
* @method RedisArray|array|false hKeys(string $key)
* @method RedisArray|int|false hLen(string $key)
* @method RedisArray|array|false hMget(string $key, array $fields)
* @method RedisArray|array|false hgetex(string $key, array $fields, string|array|null $expiry = null)
* @method RedisArray|int|false hsetex(string $key, array $fields, ?array $expiry = null)
* @method RedisArray|array|false hgetdel(string $key, array $fields)
* @method RedisArray|bool hMset(string $key, array $fieldvals)
* @method RedisArray|string|array|false hRandField(string $key, ?array $options = null)
* @method RedisArray|int|false hSet(string $key, mixed ...$fields_and_vals)
* @method RedisArray|bool hSetNx(string $key, string $field, mixed $value)
* @method RedisArray|int|false hStrLen(string $key, string $field)
* @method RedisArray|array|false hVals(string $key)
* @method RedisArray|array|false httl(string $key, array $fields)
* @method RedisArray|array|false hpttl(string $key, array $fields)
* @method RedisArray|array|false hexpiretime(string $key, array $fields)
* @method RedisArray|array|false hpexpiretime(string $key, array $fields)
* @method RedisArray|array|false hpersist(string $key, array $fields)
* @method RedisArray|int|false expiremember(string $key, string $field, int $ttl, ?string $unit = null)
* @method RedisArray|int|false expirememberat(string $key, string $field, int $timestamp)
* @method RedisArray|int|false incr(string $key, int $by = 1)
* @method RedisArray|int|false incrBy(string $key, int $value)
* @method RedisArray|float|false incrByFloat(string $key, float $value)
* @method bool isConnected()
* @method lInsert(string $key, string $pos, mixed $pivot, mixed $value)
* @method Redis|int|false lLen(string $key)
* @method Redis|string|false lMove(string $src, string $dst, string $wherefrom, string $whereto)
* @method Redis|string|false blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
* @method Redis|bool|string|array lPop(string $key, int $count = 0)
* @method Redis|null|bool|int|array lPos(string $key, mixed $value, ?array $options = null)
* @method Redis|int|false lPush(string $key, mixed ...$elements)
* @method Redis|int|false rPush(string $key, mixed ...$elements)
* @method Redis|int|false lPushx(string $key, mixed $value)
* @method Redis|int|false rPushx(string $key, mixed $value)
* @method Redis|bool lSet(string $key, int $index, mixed $value)
* @method RedisArray|int|false lLen(string $key)
* @method RedisArray|string|false lMove(string $src, string $dst, string $wherefrom, string $whereto)
* @method RedisArray|string|false blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
* @method RedisArray|bool|string|array lPop(string $key, int $count = 0)
* @method RedisArray|null|bool|int|array lPos(string $key, mixed $value, ?array $options = null)
* @method RedisArray|int|false lPush(string $key, mixed ...$elements)
* @method RedisArray|int|false rPush(string $key, mixed ...$elements)
* @method RedisArray|int|false lPushx(string $key, mixed $value)
* @method RedisArray|int|false rPushx(string $key, mixed $value)
* @method RedisArray|bool lSet(string $key, int $index, mixed $value)
* @method int lastSave()
* @method mixed lindex(string $key, int $index)
* @method Redis|array|false lrange(string $key, int $start , int $end)
* @method Redis|int|false lrem(string $key, mixed $value, int $count = 0)
* @method Redis|bool ltrim(string $key, int $start , int $end)
* @method Redis|bool move(string $key, int $index)
* @method Redis|bool msetnx(array $key_values)
* @method Redis|int|string|false object(string $subcommand, string $key)
* @method RedisArray|array|false lrange(string $key, int $start , int $end)
* @method RedisArray|int|false lrem(string $key, mixed $value, int $count = 0)
* @method RedisArray|bool ltrim(string $key, int $start , int $end)
* @method RedisArray|bool move(string $key, int $index)
* @method RedisArray|bool msetnx(array $key_values)
* @method RedisArray|int|string|false object(string $subcommand, string $key)
* @method bool open(string $host, int $port = 6379, float $timeout = 0, ?string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, ?array $context = null)
* @method bool pconnect(string $host, int $port = 6379, float $timeout = 0, ?string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, ?array $context = null)
* @method Redis|bool persist(string $key)
* @method RedisArray|bool persist(string $key)
* @method bool pexpire(string $key, int $timeout, ?string $mode = null)
* @method Redis|bool pexpireAt(string $key, int $timestamp, ?string $mode = null)
* @method Redis|int pfadd(string $key, array $elements)
* @method Redis|int|false pfcount(array|string $key_or_keys)
* @method Redis|bool pfmerge(string $dst, array $srckeys)
* @method bool|Redis pipeline()
* @method RedisArray|bool pexpireAt(string $key, int $timestamp, ?string $mode = null)
* @method RedisArray|int pfadd(string $key, array $elements)
* @method RedisArray|int|false pfcount(array|string $key_or_keys)
* @method RedisArray|bool pfmerge(string $dst, array $srckeys)
* @method bool|RedisArray pipeline()
* @method bool popen(string $host, int $port = 6379, float $timeout = 0, ?string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, ?array $context = null)
* @method Redis|bool psetex(string $key, int $expire, mixed $value)
* @method RedisArray|bool psetex(string $key, int $expire, mixed $value)
* @method bool psubscribe(array $patterns, callable $cb)
* @method Redis|int|false pttl(string $key)
* @method Redis|int|false publish(string $channel, string $message)
* @method RedisArray|int|false pttl(string $key)
* @method RedisArray|int|false publish(string $channel, string $message)
* @method mixed pubsub(string $command, mixed $arg = null)
* @method Redis|array|bool punsubscribe(array $patterns)
* @method Redis|array|string|bool rPop(string $key, int $count = 0)
* @method Redis|string|false randomKey()
* @method RedisArray|array|bool punsubscribe(array $patterns)
* @method RedisArray|array|string|bool rPop(string $key, int $count = 0)
* @method RedisArray|string|false randomKey()
* @method mixed rawcommand(string $command, mixed ...$args)
* @method Redis|bool rename(string $old_name, string $new_name)
* @method Redis|bool renameNx(string $key_src, string $key_dst)
* @method Redis|bool reset()
* @method Redis|bool restore(string $key, int $ttl, string $value, ?array $options = null)
* @method RedisArray|bool rename(string $old_name, string $new_name)
* @method RedisArray|bool renameNx(string $key_src, string $key_dst)
* @method RedisArray|bool reset()
* @method RedisArray|bool restore(string $key, int $ttl, string $value, ?array $options = null)
* @method mixed role()
* @method Redis|string|false rpoplpush(string $srckey, string $dstkey)
* @method Redis|int|false sAdd(string $key, mixed $value, mixed ...$other_values)
* @method RedisArray|string|false rpoplpush(string $srckey, string $dstkey)
* @method RedisArray|int|false sAdd(string $key, mixed $value, mixed ...$other_values)
* @method int sAddArray(string $key, array $values)
* @method Redis|array|false sDiff(string $key, string ...$other_keys)
* @method Redis|int|false sDiffStore(string $dst, string $key, string ...$other_keys)
* @method Redis|array|false sInter(array|string $key, string ...$other_keys)
* @method Redis|int|false sintercard(array $keys, int $limit = -1)
* @method Redis|int|false sInterStore(array|string $key, string ...$other_keys)
* @method Redis|array|false sMembers(string $key)
* @method Redis|array|false sMisMember(string $key, string $member, string ...$other_members)
* @method Redis|bool sMove(string $src, string $dst, mixed $value)
* @method Redis|string|array|false sPop(string $key, int $count = 0)
* @method RedisArray|array|false sDiff(string $key, string ...$other_keys)
* @method RedisArray|int|false sDiffStore(string $dst, string $key, string ...$other_keys)
* @method RedisArray|array|false sInter(array|string $key, string ...$other_keys)
* @method RedisArray|int|false sintercard(array $keys, int $limit = -1)
* @method RedisArray|int|false sInterStore(array|string $key, string ...$other_keys)
* @method RedisArray|array|false sMembers(string $key)
* @method RedisArray|array|false sMisMember(string $key, string $member, string ...$other_members)
* @method RedisArray|bool sMove(string $src, string $dst, mixed $value)
* @method RedisArray|string|array|false sPop(string $key, int $count = 0)
* @method mixed sRandMember(string $key, int $count = 0)
* @method Redis|array|false sUnion(string $key, string ...$other_keys)
* @method Redis|int|false sUnionStore(string $dst, string $key, string ...$other_keys)
* @method Redis|int|false scard(string $key)
* @method RedisArray|array|false sUnion(string $key, string ...$other_keys)
* @method RedisArray|int|false sUnionStore(string $dst, string $key, string ...$other_keys)
* @method RedisArray|int|false scard(string $key)
* @method mixed script(string $command, mixed ...$args)
* @method Redis|string|bool set(string $key, mixed $value, mixed $options = null)
* @method Redis|int|false setBit(string $key, int $idx, bool $value)
* @method Redis|int|false setRange(string $key, int $index, string $value)
* @method RedisArray|string|bool set(string $key, mixed $value, mixed $options = null)
* @method RedisArray|int|false setBit(string $key, int $idx, bool $value)
* @method RedisArray|int|false setRange(string $key, int $index, string $value)
* @method setex(string $key, int $expire, mixed $value)
* @method Redis|bool setnx(string $key, mixed $value)
* @method Redis|bool sismember(string $key, mixed $value)
* @method Redis|bool slaveof(?string $host = null, int $port = 6379)
* @method Redis|bool replicaof(?string $host = null, int $port = 6379)
* @method Redis|int|false touch(array|string $key_or_array, string ...$more_keys)
* @method RedisArray|bool setnx(string $key, mixed $value)
* @method RedisArray|bool sismember(string $key, mixed $value)
* @method RedisArray|bool slaveof(?string $host = null, int $port = 6379)
* @method RedisArray|bool replicaof(?string $host = null, int $port = 6379)
* @method RedisArray|int|false touch(array|string $key_or_array, string ...$more_keys)
* @method mixed slowlog(string $operation, int $length = 0)
* @method mixed sort(string $key, ?array $options = null)
* @method mixed sort_ro(string $key, ?array $options = null)
@@ -188,73 +188,73 @@
* @method array sortAscAlpha(string $key, ?string $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, ?string $store = null)
* @method array sortDesc(string $key, ?string $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, ?string $store = null)
* @method array sortDescAlpha(string $key, ?string $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, ?string $store = null)
* @method Redis|int|false srem(string $key, mixed $value, mixed ...$other_values)
* @method RedisArray|int|false srem(string $key, mixed $value, mixed ...$other_values)
* @method bool ssubscribe(array $channels, callable $cb)
* @method Redis|int|false strlen(string $key)
* @method RedisArray|int|false strlen(string $key)
* @method bool subscribe(array $channels, callable $cb)
* @method Redis|array|bool sunsubscribe(array $channels)
* @method Redis|bool swapdb(int $src, int $dst)
* @method Redis|array time()
* @method Redis|int|false ttl(string $key)
* @method Redis|int|false type(string $key)
* @method Redis|array|bool unsubscribe(array $channels)
* @method Redis|bool watch(array|string $key, string ...$other_keys)
* @method RedisArray|array|bool sunsubscribe(array $channels)
* @method RedisArray|bool swapdb(int $src, int $dst)
* @method RedisArray|array time()
* @method RedisArray|int|false ttl(string $key)
* @method RedisArray|int|false type(string $key)
* @method RedisArray|array|bool unsubscribe(array $channels)
* @method RedisArray|bool watch(array|string $key, string ...$other_keys)
* @method int|false wait(int $numreplicas, int $timeout)
* @method int|false xack(string $key, string $group, array $ids)
* @method Redis|string|false xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
* @method Redis|bool|array xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
* @method Redis|array|bool xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
* @method Redis|int|false xdel(string $key, array $ids)
* @method RedisArray|string|false xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
* @method RedisArray|bool|array xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
* @method RedisArray|array|bool xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
* @method RedisArray|int|false xdel(string $key, array $ids)
* @method mixed xinfo(string $operation, ?string $arg1 = null, ?string $arg2 = null, int $count = -1)
* @method Redis|int|false xlen(string $key)
* @method Redis|array|false xpending(string $key, string $group, ?string $start = null, ?string $end = null, int $count = -1, ?string $consumer = null)
* @method Redis|array|bool xrange(string $key, string $start, string $end, int $count = -1)
* @method Redis|array|bool xread(array $streams, int $count = -1, int $block = -1)
* @method Redis|array|bool xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
* @method Redis|array|bool xrevrange(string $key, string $end, string $start, int $count = -1)
* @method Redis|int|false vadd(string $key, array $values, mixed $element, array|null $options = null)
* @method Redis|array|false vsim(string $key, mixed $member, array|null $options = null)
* @method Redis|int|false vcard(string $key)
* @method Redis|int|false vdim(string $key)
* @method Redis|array|false vinfo(string $key)
* @method Redis|bool vismember(string $key, mixed $member)
* @method Redis|array|false vemb(string $key, mixed $member, bool $raw = false)
* @method Redis|array|string|false vrandmember(string $key, int $count = 0)
* @method Redis|array|false vrange(string $key, string $min, string $max, int $count = -1)
* @method Redis|int|false vrem(string $key, mixed $member)
* @method Redis|int|false vsetattr(string $key, mixed $member, array|string $attributes)
* @method Redis|array|string|false vgetattr(string $key, mixed $member, bool $decode = true)
* @method Redis|array|false vlinks(string $key, mixed $member, bool $withscores = false)
* @method Redis|int|false xtrim(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
* @method Redis|int|float|false zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
* @method Redis|int|false zCard(string $key)
* @method Redis|int|false zCount(string $key, int|string $start, int|string $end)
* @method Redis|float|false zIncrBy(string $key, float $value, mixed $member)
* @method Redis|int|false zLexCount(string $key, string $min, string $max)
* @method Redis|array|false zMscore(string $key, mixed $member, mixed ...$other_members)
* @method Redis|array|false zPopMax(string $key, ?int $count = null)
* @method Redis|array|false zPopMin(string $key, ?int $count = null)
* @method Redis|array|false zRange(string $key, string|int $start, string|int $end, array|bool|null $options = null)
* @method Redis|array|false zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1)
* @method Redis|array|false zRangeByScore(string $key, string $start, string $end, array $options = [])
* @method Redis|string|array zRandMember(string $key, ?array $options = null)
* @method Redis|int|false zRank(string $key, mixed $member)
* @method Redis|int|false zRem(mixed $key, mixed $member, mixed ...$other_members)
* @method Redis|int|false zRemRangeByLex(string $key, string $min, string $max)
* @method Redis|int|false zRemRangeByRank(string $key, int $start, int $end)
* @method Redis|int|false zRemRangeByScore(string $key, string $start, string $end)
* @method Redis|array|false zRevRange(string $key, int $start, int $end, mixed $scores = null)
* @method Redis|array|false zRevRangeByLex(string $key, string $max, string $min, int $offset = -1, int $count = -1)
* @method Redis|array|false zRevRangeByScore(string $key, string $max, string $min, array|bool $options = [])
* @method Redis|int|false zRevRank(string $key, mixed $member)
* @method Redis|float|false zScore(string $key, mixed $member)
* @method Redis|array|false zdiff(array $keys, ?array $options = null)
* @method Redis|int|false zdiffstore(string $dst, array $keys)
* @method Redis|array|false zinter(array $keys, ?array $weights = null, ?array $options = null)
* @method Redis|int|false zintercard(array $keys, int $limit = -1)
* @method Redis|int|false zinterstore(string $dst, array $keys, ?array $weights = null, ?string $aggregate = null)
* @method Redis|array|false zunion(array $keys, ?array $weights = null, ?array $options = null)
* @method Redis|int|false zunionstore(string $dst, array $keys, ?array $weights = null, ?string $aggregate = null)
* @method RedisArray|int|false xlen(string $key)
* @method RedisArray|array|false xpending(string $key, string $group, ?string $start = null, ?string $end = null, int $count = -1, ?string $consumer = null)
* @method RedisArray|array|bool xrange(string $key, string $start, string $end, int $count = -1)
* @method RedisArray|array|bool xread(array $streams, int $count = -1, int $block = -1)
* @method RedisArray|array|bool xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
* @method RedisArray|array|bool xrevrange(string $key, string $end, string $start, int $count = -1)
* @method RedisArray|int|false vadd(string $key, array $values, mixed $element, array|null $options = null)
* @method RedisArray|array|false vsim(string $key, mixed $member, array|null $options = null)
* @method RedisArray|int|false vcard(string $key)
* @method RedisArray|int|false vdim(string $key)
* @method RedisArray|array|false vinfo(string $key)
* @method RedisArray|bool vismember(string $key, mixed $member)
* @method RedisArray|array|false vemb(string $key, mixed $member, bool $raw = false)
* @method RedisArray|array|string|false vrandmember(string $key, int $count = 0)
* @method RedisArray|array|false vrange(string $key, string $min, string $max, int $count = -1)
* @method RedisArray|int|false vrem(string $key, mixed $member)
* @method RedisArray|int|false vsetattr(string $key, mixed $member, array|string $attributes)
* @method RedisArray|array|string|false vgetattr(string $key, mixed $member, bool $decode = true)
* @method RedisArray|array|false vlinks(string $key, mixed $member, bool $withscores = false)
* @method RedisArray|int|false xtrim(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
* @method RedisArray|int|float|false zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
* @method RedisArray|int|false zCard(string $key)
* @method RedisArray|int|false zCount(string $key, int|string $start, int|string $end)
* @method RedisArray|float|false zIncrBy(string $key, float $value, mixed $member)
* @method RedisArray|int|false zLexCount(string $key, string $min, string $max)
* @method RedisArray|array|false zMscore(string $key, mixed $member, mixed ...$other_members)
* @method RedisArray|array|false zPopMax(string $key, ?int $count = null)
* @method RedisArray|array|false zPopMin(string $key, ?int $count = null)
* @method RedisArray|array|false zRange(string $key, string|int $start, string|int $end, array|bool|null $options = null)
* @method RedisArray|array|false zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1)
* @method RedisArray|array|false zRangeByScore(string $key, string $start, string $end, array $options = [])
* @method RedisArray|string|array zRandMember(string $key, ?array $options = null)
* @method RedisArray|int|false zRank(string $key, mixed $member)
* @method RedisArray|int|false zRem(mixed $key, mixed $member, mixed ...$other_members)
* @method RedisArray|int|false zRemRangeByLex(string $key, string $min, string $max)
* @method RedisArray|int|false zRemRangeByRank(string $key, int $start, int $end)
* @method RedisArray|int|false zRemRangeByScore(string $key, string $start, string $end)
* @method RedisArray|array|false zRevRange(string $key, int $start, int $end, mixed $scores = null)
* @method RedisArray|array|false zRevRangeByLex(string $key, string $max, string $min, int $offset = -1, int $count = -1)
* @method RedisArray|array|false zRevRangeByScore(string $key, string $max, string $min, array|bool $options = [])
* @method RedisArray|int|false zRevRank(string $key, mixed $member)
* @method RedisArray|float|false zScore(string $key, mixed $member)
* @method RedisArray|array|false zdiff(array $keys, ?array $options = null)
* @method RedisArray|int|false zdiffstore(string $dst, array $keys)
* @method RedisArray|array|false zinter(array $keys, ?array $weights = null, ?array $options = null)
* @method RedisArray|int|false zintercard(array $keys, int $limit = -1)
* @method RedisArray|int|false zinterstore(string $dst, array $keys, ?array $weights = null, ?string $aggregate = null)
* @method RedisArray|array|false zunion(array $keys, ?array $weights = null, ?array $options = null)
* @method RedisArray|int|false zunionstore(string $dst, array $keys, ?array $weights = null, ?string $aggregate = null)
*/
class RedisArray {
+1 -1
View File
@@ -654,7 +654,7 @@ class RedisCluster {
*
* @param string|array $key_or_address Either a key name or array with host and port indicating
* which cluster node we want to send the command to.
* @param string ...$sections Optional section(s) you wish Redis server to return.
* @param string $sections Optional section(s) you wish Redis server to return.
*
* @return RedisCluster|array|false
*/