Add getArgument($index) in Predis\Command\CommandInterface.

This method should have been part of the interface since start since
it is used through the library. We also do not specify a default value
for the index argument since it does not make much sense.
This commit is contained in:
Daniele Alessandri
2013-02-17 12:22:00 +01:00
parent 729e40d6c0
commit 6b6b73f5f4
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ abstract class AbstractCommand implements CommandInterface
*
* @param array $arguments Position of the argument.
*/
public function getArgument($index = 0)
public function getArgument($index)
{
if (isset($this->arguments[$index])) {
return $this->arguments[$index];
+7
View File
@@ -59,6 +59,13 @@ interface CommandInterface
*/
public function getArguments();
/**
* Gets the argument of the command at the specified index.
*
* @return array
*/
public function getArgument($index);
/**
* Parses a reply buffer and returns a PHP object.
*