PHP Class Predis\Connection\WebdisConnection

Some features are not yet available or they simply cannot be implemented: - Pipelining commands. - Publish / Subscribe. - MULTI / EXEC transactions (not yet supported by Webdis). The connection parameters supported by this class are: - scheme: must be 'http'. - host: hostname or IP address of the server. - port: TCP port of the server. - timeout: timeout to perform the connection. - user: username for authentication. - pass: password for authentication.
Inheritance: implements Predis\Connection\SingleConnectionInterface
Afficher le fichier Open project: nrk/predis Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Predis\Connection\ParametersInterface $parameters )
__destruct ( ) Frees the underlying cURL and protocol reader resources when the garbage collector kicks in.
__sleep ( )
__toString ( )
__wakeup ( )
addConnectCommand ( Predis\Command\CommandInterface $command )
connect ( )
disconnect ( )
executeCommand ( Predis\Command\CommandInterface $command )
getParameters ( )
getResource ( )
isConnected ( )
read ( )
readResponse ( Predis\Command\CommandInterface $command )
writeRequest ( Predis\Command\CommandInterface $command )

Méthodes protégées

Méthode Description
feedReader ( resource $resource, string $buffer ) : integer Feeds the phpredis reader resource with the data read from the network.
getCommandId ( Predis\Command\CommandInterface $command ) : string Checks if the specified command is supported by this connection class.
getErrorHandler ( ) : Closure Returns the handler used by the protocol reader for error responses.
getStatusHandler ( ) : Closure Returns the handler used by the protocol reader for inline responses.

Private Methods

Méthode Description
assertExtensions ( ) Checks if the cURL and phpiredis extensions are loaded in PHP.
createCurl ( ) : resource Initializes cURL.
createReader ( ) : resource Initializes the phpiredis protocol reader.
throwNotSupportedException ( string $method ) Helper method used to throw on unsupported methods.

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

Frees the underlying cURL and protocol reader resources when the garbage collector kicks in.
public __destruct ( )

__sleep() public méthode

public __sleep ( )

__toString() public méthode

public __toString ( )

__wakeup() public méthode

public __wakeup ( )

addConnectCommand() public méthode

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

connect() public méthode

public connect ( )

disconnect() public méthode

public disconnect ( )

executeCommand() public méthode

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

feedReader() protected méthode

Feeds the phpredis reader resource with the data read from the network.
protected feedReader ( resource $resource, string $buffer ) : integer
$resource resource Reader resource.
$buffer string Buffer of data read from a connection.
Résultat integer

getCommandId() protected méthode

Checks if the specified command is supported by this connection class.
protected getCommandId ( Predis\Command\CommandInterface $command ) : string
$command Predis\Command\CommandInterface Command instance.
Résultat string

getErrorHandler() protected méthode

Returns the handler used by the protocol reader for error responses.
protected getErrorHandler ( ) : Closure
Résultat Closure

getParameters() public méthode

public getParameters ( )

getResource() public méthode

public getResource ( )

getStatusHandler() protected méthode

Returns the handler used by the protocol reader for inline responses.
protected getStatusHandler ( ) : Closure
Résultat Closure

isConnected() public méthode

public isConnected ( )

read() public méthode

public read ( )

readResponse() public méthode

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

writeRequest() public méthode

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