PhpRedisClusterConnection
class PhpRedisClusterConnection extends PhpRedisConnection
Properties
| protected Client | $client | The Predis client. |
from Connection |
Methods
Subscribe to a set of given channels for messages.
Subscribe to a set of given channels for messages.
Subscribe to a set of given channels with wildcards.
Run a command against the Redis database.
Pass other method calls down to the underlying client.
Set the string value in argument as value of the key.
Removes the first count occurrences of the value element from the list.
Removes and returns a random element from the set value at key.
Add one or more members to a sorted set or update its score if it already exists.
Execute commands in a pipeline.
Execute commands in a transaction.
Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
Proxy a call to the eval function of PhpRedis.
Details
in
PhpRedisConnection at line 212
void
createSubscription(array|string $channels, Closure $callback, string $method = 'subscribe')
Subscribe to a set of given channels for messages.
in
Connection at line 34
mixed
client()
Get the underlying Redis client.
in
PhpRedisConnection at line 183
void
subscribe(array|string $channels, Closure $callback)
Subscribe to a set of given channels for messages.
in
PhpRedisConnection at line 197
void
psubscribe(array|string $channels, Closure $callback)
Subscribe to a set of given channels with wildcards.
in
Connection at line 70
mixed
command(string $method, array $parameters = [])
Run a command against the Redis database.
in
PhpRedisConnection at line 245
mixed
__call(string $method, array $parameters)
Pass other method calls down to the underlying client.
in
PhpRedisConnection at line 18
void
__construct(Redis $client)
Create a new PhpRedis connection.
in
PhpRedisConnection at line 29
string|null
get(string $key)
Returns the value of the given key.
in
PhpRedisConnection at line 42
array
mget(array $keys)
Get the values of all the given keys.
in
PhpRedisConnection at line 59
bool
set(string $key, mixed $value, string|null $expireResolution = null, int|null $expireTTL = null, string|null $flag = null)
Set the string value in argument as value of the key.
in
PhpRedisConnection at line 76
int|false
lrem(string $key, int $count, $value)
Removes the first count occurrences of the value element from the list.
in
PhpRedisConnection at line 88
mixed|false
spop(string $key, int|null $count = null)
Removes and returns a random element from the set value at key.
in
PhpRedisConnection at line 100
int
zadd(string $key, mixed ...$dictionary)
Add one or more members to a sorted set or update its score if it already exists.
in
PhpRedisConnection at line 122
array|Redis
pipeline(callable $callback = null)
Execute commands in a pipeline.
in
PhpRedisConnection at line 137
array|Redis
transaction(callable $callback = null)
Execute commands in a transaction.
in
PhpRedisConnection at line 154
mixed
evalsha(string $script, int $numkeys, mixed ...$arguments)
Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
in
PhpRedisConnection at line 167
protected mixed
proxyToEval(array $parameters)
Proxy a call to the eval function of PhpRedis.
in
PhpRedisConnection at line 223
mixed
executeRaw(array $parameters)
Execute a raw command.
in
PhpRedisConnection at line 233
void
disconnect()
Disconnects from the Redis instance.