Method | Description | |
---|---|---|
__call ( $commandID, $arguments ) | ||
__construct ( mixed $parameters = null, mixed $options = null ) | ||
connect ( ) | Opens the underlying connection and connects to the server. | |
createCommand ( $commandID, $arguments = [] ) | ||
disconnect ( ) | Closes the underlying connection and disconnects from the server. | |
executeCommand ( Predis\Command\CommandInterface $command ) | ||
executeRaw ( array $arguments, boolean &$error = null ) : mixed | Executes a command without filtering its arguments, parsing the response, applying any prefix to keys or throwing exceptions on Redis errors even regardless of client options. | |
getClientBy ( string $selector, string $value, callable | null $callable = null ) : predis\ClientInterface | mixed | Creates a new client from the specified . | |
getCommandFactory ( ) | ||
getConnection ( ) | ||
getIterator ( ) | ||
getOptions ( ) | ||
isConnected ( ) : boolean | Returns the current state of the underlying connection. | |
monitor ( ) : |
Creates a new monitor consumer and returns it. | |
pipeline ( ) : |
Creates a new pipeline context and returns it, or returns the results of a pipeline executed inside the optionally provided callable object. | |
pubSubLoop ( ) : |
Creates a new publish/subscribe context and returns it, or starts its loop inside the optionally provided callable object. | |
quit ( ) | Closes the underlying connection and disconnects from the server. | |
transaction ( ) : |
Creates a new transaction context and returns it, or returns the results of a transaction executed inside the optionally provided callable object. |
Method | Description | |
---|---|---|
createAggregateConnection ( mixed $parameters, string $option ) : Closure | Creates an aggregate connection. | |
createConnection ( mixed $parameters ) : Predis\Connection\ConnectionInterface | Creates single or aggregate connections from different types of arguments (string, array) or returns the passed argument if it is an instance of a class implementing Predis\Connection\ConnectionInterface. | |
createOptions ( mixed $options ) : Predis\Configuration\OptionsInterface | Creates a new instance of Predis\Configuration\Options from different types of arguments or simply returns the passed argument if it is an instance of Predis\Configuration\OptionsInterface. | |
createPipeline ( array $options = null, mixed $callable = null ) : |
Actual pipeline context initializer method. | |
createPubSub ( array $options = null, mixed $callable = null ) : |
Actual publish/subscribe context initializer method. | |
createTransaction ( array $options = null, mixed $callable = null ) : |
Actual transaction context initializer method. | |
onErrorResponse ( Predis\Command\CommandInterface $command, Predis\Response\ErrorInterface $response ) : mixed | Handles -ERR responses returned by Redis. |
Method | Description | |
---|---|---|
sharedContextFactory ( string $initializer, array $argv = null ) : mixed | Executes the specified initializer method on $this by adjusting the actual invokation depending on the arity (0, 1 or 2 arguments). This is simply an utility method to create Redis contexts instances since they follow a common initialization path. |
public __construct ( mixed $parameters = null, mixed $options = null ) | ||
$parameters | mixed | Connection parameters for one or more servers. |
$options | mixed | Options to configure some behaviours of the client. |
public connect ( ) |
protected createConnection ( mixed $parameters ) : Predis\Connection\ConnectionInterface | ||
$parameters | mixed | Connection parameters or connection instance. |
return | Predis\Connection\ConnectionInterface |
protected createOptions ( mixed $options ) : Predis\Configuration\OptionsInterface | ||
$options | mixed | Client options. |
return | Predis\Configuration\OptionsInterface |
public disconnect ( ) |
public executeCommand ( Predis\Command\CommandInterface $command ) | ||
$command | Predis\Command\CommandInterface |
public getClientBy ( string $selector, string $value, callable | null $callable = null ) : predis\ClientInterface | mixed | ||
$selector | string | Type of selector (`id`, `key`, `slot`, `command`) |
$value | string | Values of selector. |
$callable | callable | null | Optional callable object. |
return | predis\ClientInterface | mixed |
public isConnected ( ) : boolean | ||
return | boolean |
public monitor ( ) : |
||
return |
protected onErrorResponse ( Predis\Command\CommandInterface $command, Predis\Response\ErrorInterface $response ) : mixed | ||
$command | Predis\Command\CommandInterface | Redis command that generated the error. |
$response | Predis\Response\ErrorInterface | Instance of the error response. |
return | mixed |
public pubSubLoop ( ) : |
||
return |
public quit ( ) |
public transaction ( ) : |
||
return |