PhpRedisClusterConnection

class PhpRedisClusterConnection extends PhpRedisConnection (View source)

Properties

protected Client $client The Predis client. from Connection

Methods

void createSubscription(array|string $channels, Closure $callback, string $method = 'subscribe')

Subscribe to a set of given channels for messages.

from PhpRedisConnection
mixed client()

Get the underlying Redis client.

from Connection
void subscribe(array|string $channels, Closure $callback)

Subscribe to a set of given channels for messages.

from PhpRedisConnection
void psubscribe(array|string $channels, Closure $callback)

Subscribe to a set of given channels with wildcards.

from PhpRedisConnection
mixed command(string $method, array $parameters = [])

Run a command against the Redis database.

from Connection
mixed __call(string $method, array $parameters)

Pass other method calls down to the underlying client.

from PhpRedisConnection
void __construct(Redis $client)

Create a new PhpRedis connection.

from PhpRedisConnection
string|null get(string $key)

Returns the value of the given key.

from PhpRedisConnection
array mget(array $keys)

Get the values of all the given keys.

from PhpRedisConnection
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.

from PhpRedisConnection
int|false lrem(string $key, int $count, $value)

Removes the first count occurrences of the value element from the list.

from PhpRedisConnection
mixed|false spop(string $key, int|null $count = null)

Removes and returns a random element from the set value at key.

from PhpRedisConnection
int zadd(string $key, mixed $dictionary)

Add one or more members to a sorted set or update its score if it already exists.

from PhpRedisConnection
array|Redis pipeline(callable $callback = null)

Execute commands in a pipeline.

from PhpRedisConnection
array|Redis transaction(callable $callback = null)

Execute commands in a transaction.

from PhpRedisConnection
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.

from PhpRedisConnection
mixed proxyToEval(array $parameters)

Proxy a call to the eval function of PhpRedis.

from PhpRedisConnection
mixed executeRaw(array $parameters)

Execute a raw command.

from PhpRedisConnection
void disconnect()

Disconnects from the Redis instance.

from PhpRedisConnection

Details

void createSubscription(array|string $channels, Closure $callback, string $method = 'subscribe')

Subscribe to a set of given channels for messages.

Parameters

array|string $channels
Closure $callback
string $method

Return Value

void

mixed client()

Get the underlying Redis client.

Return Value

mixed

void subscribe(array|string $channels, Closure $callback)

Subscribe to a set of given channels for messages.

Parameters

array|string $channels
Closure $callback

Return Value

void

void psubscribe(array|string $channels, Closure $callback)

Subscribe to a set of given channels with wildcards.

Parameters

array|string $channels
Closure $callback

Return Value

void

mixed command(string $method, array $parameters = [])

Run a command against the Redis database.

Parameters

string $method
array $parameters

Return Value

mixed

mixed __call(string $method, array $parameters)

Pass other method calls down to the underlying client.

Parameters

string $method
array $parameters

Return Value

mixed

void __construct(Redis $client)

Create a new PhpRedis connection.

Parameters

Redis $client

Return Value

void

string|null get(string $key)

Returns the value of the given key.

Parameters

string $key

Return Value

string|null

array mget(array $keys)

Get the values of all the given keys.

Parameters

array $keys

Return Value

array

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.

Parameters

string $key
mixed $value
string|null $expireResolution
int|null $expireTTL
string|null $flag

Return Value

bool

int|false lrem(string $key, int $count, $value)

Removes the first count occurrences of the value element from the list.

Parameters

string $key
int $count
$value $value

Return Value

int|false

mixed|false spop(string $key, int|null $count = null)

Removes and returns a random element from the set value at key.

Parameters

string $key
int|null $count

Return Value

mixed|false

int zadd(string $key, mixed $dictionary)

Add one or more members to a sorted set or update its score if it already exists.

Parameters

string $key
mixed $dictionary

Return Value

int

array|Redis pipeline(callable $callback = null)

Execute commands in a pipeline.

Parameters

callable $callback

Return Value

array|Redis

array|Redis transaction(callable $callback = null)

Execute commands in a transaction.

Parameters

callable $callback

Return Value

array|Redis

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.

Parameters

string $script
int $numkeys
mixed $arguments

Return Value

mixed

protected mixed proxyToEval(array $parameters)

Proxy a call to the eval function of PhpRedis.

Parameters

array $parameters

Return Value

mixed

mixed executeRaw(array $parameters)

Execute a raw command.

Parameters

array $parameters

Return Value

mixed

void disconnect()

Disconnects from the Redis instance.

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.5/Illuminate/Redis/Connections/PhpRedisClusterConnection.html