Redis
class Redis
Redis client.
Based on the protocol specification at http://redis.io/topics/protocol.
Constants
CRLF |
Command terminator. |
CRLF_LENGTH |
Command terminator length. |
Properties
protected string | $password | Redis password. | |
protected int | $database | Redis database. | |
protected bool | $pipelined | Is pipelining enabled? | |
protected array | $commands | Pipelined commands. | |
protected Connection | $connection | Redis connection. | |
protected array | $clusterClients | Cluster clients. | |
protected string | $lastCommand | Last command. |
Methods
Returns the connection.
Returns the cluster clients.
Creates a cluster client.
Gets a cluster client.
Handles redis error responses.
Handles a status response.
Handles a integer response.
Handles a bulk response.
Handles a multi-bulk response.
Returns response from redis server.
Sends command to server.
Executes raw Redis commands and returns the response.
Builds command from method name.
Sends command to Redis server and returns response.
Details
at line 103
__construct(Connection $connection, array $options = [])
Constructor.
at line 123
Connection
getConnection()
Returns the connection.
at line 133
array
getClusterClients()
Returns the cluster clients.
at line 144
protected Redis
createClusterClient(string $server)
Creates a cluster client.
at line 165
protected Redis
getClusterClient(string $serverInfo)
Gets a cluster client.
at line 183
protected mixed
handleErrorResponse(string $response)
Handles redis error responses.
at line 206
protected string
handleStatusResponse(string $response)
Handles a status response.
at line 217
protected int
handleIntegerResponse(string $response)
Handles a integer response.
at line 228
protected string|null
handleBulkResponse(string $response)
Handles a bulk response.
at line 246
protected array|null
handleMultiBulkResponse(string $response)
Handles a multi-bulk response.
at line 270
protected mixed
getResponse()
Returns response from redis server.
at line 301
protected
sendCommandToServer(string $command)
Sends command to server.
at line 314
array
pipeline(Closure $pipeline)
Pipeline commands.
at line 354
protected mixed
sendCommandAndGetResponse(string $command)
Executes raw Redis commands and returns the response.
at line 367
protected array
buildCommand(string $name)
Builds command from method name.
at line 393
mixed
__call(string $name, array $arguments)
Sends command to Redis server and returns response.