PHP Class Predis\Connection\AbstractConnection

Author: Daniele Alessandri ([email protected])
Inheritance: implements Predis\Connection\SingleConnectionInterface
Afficher le fichier Open project: nrk/predis Class Usage Examples

Protected Properties

Свойство Type Description
$initCommands
$parameters

Méthodes publiques

Méthode Description
__construct ( Predis\Connection\ParametersInterface $parameters )
__destruct ( ) Disconnects from the server and destroys the underlying resource when PHP's garbage collector kicks in.
__sleep ( )
__toString ( )
addConnectCommand ( Predis\Command\CommandInterface $command )
connect ( )
disconnect ( )
executeCommand ( Predis\Command\CommandInterface $command )
getParameters ( )
getResource ( )
isConnected ( )
readResponse ( Predis\Command\CommandInterface $command )

Méthodes protégées

Méthode Description
assertParameters ( Predis\Connection\ParametersInterface $parameters ) : Predis\Connection\ParametersInterface Checks some of the parameters used to initialize the connection.
createResource ( ) : mixed Creates the underlying resource used to communicate with Redis.
getIdentifier ( ) : string Gets an identifier for the connection.
onConnectionError ( string $message, integer $code = null ) Helper method to handle connection errors.
onProtocolError ( string $message ) Helper method to handle protocol errors.

Method Details

__construct() public méthode

public __construct ( Predis\Connection\ParametersInterface $parameters )
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.

__destruct() public méthode

Disconnects from the server and destroys the underlying resource when PHP's garbage collector kicks in.
public __destruct ( )

__sleep() public méthode

public __sleep ( )

__toString() public méthode

public __toString ( )

addConnectCommand() public méthode

public addConnectCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

assertParameters() abstract protected méthode

Checks some of the parameters used to initialize the connection.
abstract protected assertParameters ( Predis\Connection\ParametersInterface $parameters ) : Predis\Connection\ParametersInterface
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.
Résultat Predis\Connection\ParametersInterface

connect() public méthode

public connect ( )

createResource() abstract protected méthode

Creates the underlying resource used to communicate with Redis.
abstract protected createResource ( ) : mixed
Résultat mixed

disconnect() public méthode

public disconnect ( )

executeCommand() public méthode

public executeCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

getIdentifier() protected méthode

Gets an identifier for the connection.
protected getIdentifier ( ) : string
Résultat string

getParameters() public méthode

public getParameters ( )

getResource() public méthode

public getResource ( )

isConnected() public méthode

public isConnected ( )

onConnectionError() protected méthode

Helper method to handle connection errors.
protected onConnectionError ( string $message, integer $code = null )
$message string Error message.
$code integer Error code.

onProtocolError() protected méthode

Helper method to handle protocol errors.
protected onProtocolError ( string $message )
$message string Error message.

readResponse() public méthode

public readResponse ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

Property Details

$initCommands protected_oe property

protected $initCommands

$parameters protected_oe property

protected $parameters