Removed leftovers from the old pipeline implementation.

This commit is contained in:
Daniele Alessandri
2009-11-28 14:24:00 +01:00
parent 0adcd39486
commit 8480019b2a
+6 -12
View File
@@ -12,12 +12,11 @@ class Client {
// TODO: command arguments should be sanitized or checked for bad arguments
// (e.g. CRLF in keys for inline commands)
private $_connection, $_registeredCommands, $_pipelining;
private $_connection, $_registeredCommands;
public function __construct($host = Connection::DEFAULT_HOST, $port = Connection::DEFAULT_PORT) {
$this->_pipelining = false;
$this->_connection = new Connection($host, $port);
$this->_registeredCommands = self::initializeDefaultCommands();
$this->_connection = new Connection($host, $port);
}
public function __destruct() {
@@ -72,16 +71,11 @@ class Client {
}
public function executeCommand(Command $command) {
if ($this->_pipelining === false) {
$this->_connection->writeCommand($command);
if ($command->closesConnection()) {
return $this->_connection->disconnect();
}
return $this->_connection->readResponse($command);
}
else {
$this->_pipelineBuffer[] = $command;
$this->_connection->writeCommand($command);
if ($command->closesConnection()) {
return $this->_connection->disconnect();
}
return $this->_connection->readResponse($command);
}
public function rawCommand($rawCommandData, $closesConnection = false) {