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.
ファイルを表示
Open project: nrk/predis
Class Usage Examples
Public Methods
Protected Methods
Method |
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
Method Details
__construct()
public method
public __construct ( Predis\Connection\ParametersInterface $parameters ) |
$parameters |
Predis\Connection\ParametersInterface |
Initialization parameters for the connection. |
__destruct()
public method
Frees the underlying cURL and protocol reader resources when the garbage
collector kicks in.
__toString()
public method
addConnectCommand()
public method
public addConnectCommand ( Predis\Command\CommandInterface $command ) |
$command |
Predis\Command\CommandInterface |
|
disconnect()
public method
executeCommand()
public method
public executeCommand ( Predis\Command\CommandInterface $command ) |
$command |
Predis\Command\CommandInterface |
|
feedReader()
protected method
Feeds the phpredis reader resource with the data read from the network.
getCommandId()
protected method
Checks if the specified command is supported by this connection class.
protected getCommandId ( Predis\Command\CommandInterface $command ) : string |
$command |
Predis\Command\CommandInterface |
Command instance. |
return |
string |
|
getErrorHandler()
protected method
Returns the handler used by the protocol reader for error responses.
getParameters()
public method
getResource()
public method
getStatusHandler()
protected method
Returns the handler used by the protocol reader for inline responses.
isConnected()
public method
readResponse()
public method
public readResponse ( Predis\Command\CommandInterface $command ) |
$command |
Predis\Command\CommandInterface |
|
writeRequest()
public method
public writeRequest ( Predis\Command\CommandInterface $command ) |
$command |
Predis\Command\CommandInterface |
|