Documentation

CompositeConnectionInterface extends NodeConnectionInterface

Defines a connection to communicate with a single Redis server that leverages an external protocol processor to handle pluggable protocol handlers.

Tags
author

Daniele Alessandri suppakilla@gmail.com

Table of Contents

__toString()  : string
Returns a string representation of the connection.
addConnectCommand()  : mixed
Pushes the given command into a queue of commands executed when establishing the actual connection to Redis.
connect()  : mixed
Opens the connection to Redis.
disconnect()  : mixed
Closes the connection to Redis.
executeCommand()  : mixed
Writes a request for the given command over the connection and reads back the response returned by Redis.
getParameters()  : ParametersInterface
Returns the parameters used to initialize the connection.
getProtocol()  : mixed
Returns the protocol processor used by the connection.
getResource()  : mixed
Returns the underlying resource used to communicate with Redis.
isConnected()  : bool
Checks if the connection to Redis is considered open.
read()  : mixed
Reads a response from the server.
readBuffer()  : string
Reads the given number of bytes from the connection.
readLine()  : mixed
Reads a line from the connection.
readResponse()  : mixed
Reads the response to the given command from the connection.
writeBuffer()  : mixed
Writes the buffer containing over the connection.
writeRequest()  : mixed
Writes the request for the given command over the connection.

Methods

__toString()

Returns a string representation of the connection.

public __toString() : string
Return values
string

addConnectCommand()

Pushes the given command into a queue of commands executed when establishing the actual connection to Redis.

public addConnectCommand(CommandInterface $command) : mixed
Parameters
$command : CommandInterface

Instance of a Redis command.

Return values
mixed

connect()

Opens the connection to Redis.

public connect() : mixed
Return values
mixed

disconnect()

Closes the connection to Redis.

public disconnect() : mixed
Return values
mixed

executeCommand()

Writes a request for the given command over the connection and reads back the response returned by Redis.

public executeCommand(CommandInterface $command) : mixed
Parameters
$command : CommandInterface

Command instance.

Return values
mixed

getProtocol()

Returns the protocol processor used by the connection.

public getProtocol() : mixed
Return values
mixed

getResource()

Returns the underlying resource used to communicate with Redis.

public getResource() : mixed
Return values
mixed

isConnected()

Checks if the connection to Redis is considered open.

public isConnected() : bool
Return values
bool

readBuffer()

Reads the given number of bytes from the connection.

public readBuffer(mixed $length) : string

 @param int $length Number of bytes to read from the connection.

Parameters
$length : mixed
Return values
string

writeBuffer()

Writes the buffer containing over the connection.

public writeBuffer(string $buffer) : mixed
Parameters
$buffer : string

String buffer to be sent over the connection.

Return values
mixed

Search results