PHP Class Predis\Connection\AbstractConnection

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

Protected Properties

Property Type Description
$initCommands
$parameters

Public Methods

Method 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 )

Protected Methods

Method 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 method

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

__destruct() public method

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

__sleep() public method

public __sleep ( )

__toString() public method

public __toString ( )

addConnectCommand() public method

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

assertParameters() abstract protected method

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.
return Predis\Connection\ParametersInterface

connect() public method

public connect ( )

createResource() abstract protected method

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

disconnect() public method

public disconnect ( )

executeCommand() public method

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

getIdentifier() protected method

Gets an identifier for the connection.
protected getIdentifier ( ) : string
return string

getParameters() public method

public getParameters ( )

getResource() public method

public getResource ( )

isConnected() public method

public isConnected ( )

onConnectionError() protected method

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

onProtocolError() protected method

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

readResponse() public method

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

Property Details

$initCommands protected_oe property

protected $initCommands

$parameters protected_oe property

protected $parameters