PhpRedisConnection
class PhpRedisConnection extends Connection mixin Redis
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 with wildcards.
Run a command against the Redis database.
Pass other method calls down to the underlying client.
Create a new PhpRedis connection.
Returns the value of the given key.
Get the values of all the given keys.
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.
Execute a raw command.
Disconnects from the Redis instance.
Details
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.
at line 183
void
subscribe(array|string $channels, Closure $callback)
Subscribe to a set of given channels for messages.
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.
at line 245
mixed
__call(string $method, array $parameters)
Pass other method calls down to the underlying client.
at line 18
void
__construct(Redis $client)
Create a new PhpRedis connection.
at line 29
string|null
get(string $key)
Returns the value of the given key.
at line 42
array
mget(array $keys)
Get the values of all the given keys.
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.
at line 76
int|false
lrem(string $key, int $count, $value)
Removes the first count occurrences of the value element from the list.
at line 88
mixed|false
spop(string $key, int|null $count = null)
Removes and returns a random element from the set value at key.
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.
at line 122
array|Redis
pipeline(callable $callback = null)
Execute commands in a pipeline.
at line 137
array|Redis
transaction(callable $callback = null)
Execute commands in a transaction.
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.
at line 167
protected mixed
proxyToEval(array $parameters)
Proxy a call to the eval function of PhpRedis.
at line 223
mixed
executeRaw(array $parameters)
Execute a raw command.
at line 233
void
disconnect()
Disconnects from the Redis instance.