Rename Predis\Connection\SingleConnectionInterface::pushInitCommand().

The new name is more explicit as it makes obvious that the commands
added with it will be executed upon connect().
This commit is contained in:
Daniele Alessandri
2013-12-15 11:06:43 +01:00
parent c40ad5dd47
commit 6ceebbfbec
13 changed files with 52 additions and 29 deletions
+4 -4
View File
@@ -30,7 +30,7 @@ abstract class AbstractConnection implements SingleConnectionInterface
private $cachedId;
protected $parameters;
protected $initCmds = array();
protected $initCommands = array();
/**
* @param ParametersInterface $parameters Initialization parameters for the connection.
@@ -107,9 +107,9 @@ abstract class AbstractConnection implements SingleConnectionInterface
/**
* {@inheritdoc}
*/
public function pushInitCommand(CommandInterface $command)
public function addConnectCommand(CommandInterface $command)
{
$this->initCmds[] = $command;
$this->initCommands[] = $command;
}
/**
@@ -211,6 +211,6 @@ abstract class AbstractConnection implements SingleConnectionInterface
*/
public function __sleep()
{
return array('parameters', 'initCmds');
return array('parameters', 'initCommands');
}
}