PHP Interface Predis\Connection\ConnectionInterface

Author: Daniele Alessandri ([email protected])
Show file Open project: tillkruss/redis-object-cache Interface Usage Examples

Public Methods

Method Description
connect ( ) Opens the connection to Redis.
disconnect ( ) Closes the connection to Redis.
executeCommand ( Predis\Command\CommandInterface $command ) : mixed Writes a request for the given command over the connection and reads back the response returned by Redis.
isConnected ( ) : boolean Checks if the connection to Redis is considered open.
readResponse ( Predis\Command\CommandInterface $command ) : mixed Reads the response to the given command from the connection.
writeRequest ( Predis\Command\CommandInterface $command ) Writes the request for the given command over the connection.

Method Details

connect() public method

Opens the connection to Redis.
public connect ( )

disconnect() public method

Closes the connection to Redis.
public disconnect ( )

executeCommand() public method

Writes a request for the given command over the connection and reads back the response returned by Redis.
public executeCommand ( Predis\Command\CommandInterface $command ) : mixed
$command Predis\Command\CommandInterface Command instance.
return mixed

isConnected() public method

Checks if the connection to Redis is considered open.
public isConnected ( ) : boolean
return boolean

readResponse() public method

Reads the response to the given command from the connection.
public readResponse ( Predis\Command\CommandInterface $command ) : mixed
$command Predis\Command\CommandInterface Command instance.
return mixed

writeRequest() public method

Writes the request for the given command over the connection.
public writeRequest ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface Command instance.