From d077aa67db0e15ed640643f3735fb71a265cd368 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Fri, 4 Mar 2011 13:05:28 +0100 Subject: [PATCH] Remove since it generates overhead for nothing really useful. --- lib/Predis/Client.php | 4 ++++ lib/Predis/Command.php | 4 ---- lib/Predis/ICommand.php | 1 - lib/Predis/Network/ConnectionBase.php | 3 --- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Predis/Client.php b/lib/Predis/Client.php index 97e20963..278c70c8 100644 --- a/lib/Predis/Client.php +++ b/lib/Predis/Client.php @@ -127,6 +127,10 @@ class Client { $this->_connection->disconnect(); } + public function quit() { + $this->disconnect(); + } + public function isConnected() { return $this->_connection->isConnected(); } diff --git a/lib/Predis/Command.php b/lib/Predis/Command.php index ef4fbd9d..0e00098d 100644 --- a/lib/Predis/Command.php +++ b/lib/Predis/Command.php @@ -35,10 +35,6 @@ abstract class Command implements ICommand { return null; } - public function closesConnection() { - return false; - } - protected function filterArguments(Array $arguments) { return $arguments; } diff --git a/lib/Predis/ICommand.php b/lib/Predis/ICommand.php index f8d007c5..1811d3a5 100644 --- a/lib/Predis/ICommand.php +++ b/lib/Predis/ICommand.php @@ -7,7 +7,6 @@ use Predis\Distribution\IDistributionStrategy; interface ICommand { public function getCommandId(); public function canBeHashed(); - public function closesConnection(); public function getHash(IDistributionStrategy $distributor); public function setArgumentsArray(Array $arguments); public function getArguments(); diff --git a/lib/Predis/Network/ConnectionBase.php b/lib/Predis/Network/ConnectionBase.php index 8a39d4e6..6db43355 100644 --- a/lib/Predis/Network/ConnectionBase.php +++ b/lib/Predis/Network/ConnectionBase.php @@ -40,9 +40,6 @@ abstract class ConnectionBase implements IConnectionSingle { public function executeCommand(ICommand $command) { $this->writeCommand($command); - if ($command->closesConnection()) { - return $this->disconnect(); - } return $this->readResponse($command); }