Remove Predis\Commands\Command::setArguments().

This commit is contained in:
Daniele Alessandri
2011-04-09 08:33:09 +02:00
parent 83bab78bd1
commit 944a478272
4 changed files with 4 additions and 15 deletions
+1 -6
View File
@@ -12,12 +12,7 @@ abstract class Command implements ICommand {
return $arguments;
}
public function setArguments(/* arguments */) {
$this->_arguments = $this->filterArguments(func_get_args());
unset($this->_hash);
}
public function setArgumentsArray(Array $arguments) {
public function setArguments(Array $arguments) {
$this->_arguments = $this->filterArguments($arguments);
unset($this->_hash);
}
+1 -1
View File
@@ -7,7 +7,7 @@ use Predis\Distribution\IDistributionStrategy;
interface ICommand {
public function getId();
public function getHash(IDistributionStrategy $distributor);
public function setArgumentsArray(Array $arguments);
public function setArguments(Array $arguments);
public function getArguments();
public function parseResponse($data);
}
+1 -1
View File
@@ -81,7 +81,7 @@ abstract class ServerProfile implements IServerProfile, IPreprocessingSupport {
}
$commandClass = $this->_registeredCommands[$method];
$command = new $commandClass();
$command->setArgumentsArray($arguments);
$command->setArguments($arguments);
return $command;
}
+1 -7
View File
@@ -65,13 +65,7 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
$cmdArgs = array('key1', 'key2', 'key3');
$cmd = new \Predis\Commands\GetMultiple();
$cmd->setArgumentsArray($cmdArgs);
$this->assertEquals($cmdArgs[0], $cmd->getArgument(0));
$this->assertEquals($cmdArgs[1], $cmd->getArgument(1));
$this->assertEquals($cmdArgs[2], $cmd->getArgument(2));
$cmd = new \Predis\Commands\GetMultiple();
$cmd->setArguments('key1', 'key2', 'key3');
$cmd->setArguments($cmdArgs);
$this->assertEquals($cmdArgs[0], $cmd->getArgument(0));
$this->assertEquals($cmdArgs[1], $cmd->getArgument(1));
$this->assertEquals($cmdArgs[2], $cmd->getArgument(2));