PHP Interface Predis\ClientInterface

All the commands exposed by the client generally have the same signature as described by the Redis documentation, but some of them offer an additional and more friendly interface to ease programming which is described in the following list of methods:
Author: Daniele Alessandri ([email protected])
Mostra file Open project: nrk/predis Interface Usage Examples

Public Methods

Method Description
__call ( string $method, array $arguments ) : mixed Creates a Redis command with the specified arguments and sends a request to the server.
connect ( ) Opens the underlying connection to the server.
createCommand ( string $method, array $arguments = [] ) : Predis\Command\CommandInterface Creates a new instance of the specified Redis command.
disconnect ( ) Closes the underlying connection from the server.
executeCommand ( Predis\Command\CommandInterface $command ) : mixed Executes the specified Redis command.
getCommandFactory ( ) : Predis\Command\FactoryInterface Returns the command factory used by the client.
getConnection ( ) : Predis\Connection\ConnectionInterface Returns the underlying connection instance.
getOptions ( ) : Predis\Configuration\OptionsInterface Returns the client options specified upon initialization.

Method Details

__call() public method

Creates a Redis command with the specified arguments and sends a request to the server.
public __call ( string $method, array $arguments ) : mixed
$method string Command ID.
$arguments array Arguments for the command.
return mixed

connect() public method

Opens the underlying connection to the server.
public connect ( )

createCommand() public method

Creates a new instance of the specified Redis command.
public createCommand ( string $method, array $arguments = [] ) : Predis\Command\CommandInterface
$method string Command ID.
$arguments array Arguments for the command.
return Predis\Command\CommandInterface

disconnect() public method

Closes the underlying connection from the server.
public disconnect ( )

executeCommand() public method

Executes the specified Redis command.
public executeCommand ( Predis\Command\CommandInterface $command ) : mixed
$command Predis\Command\CommandInterface Command instance.
return mixed

getCommandFactory() public method

Returns the command factory used by the client.
public getCommandFactory ( ) : Predis\Command\FactoryInterface
return Predis\Command\FactoryInterface

getConnection() public method

Returns the underlying connection instance.
public getConnection ( ) : Predis\Connection\ConnectionInterface
return Predis\Connection\ConnectionInterface

getOptions() public method

Returns the client options specified upon initialization.
public getOptions ( ) : Predis\Configuration\OptionsInterface
return Predis\Configuration\OptionsInterface