library/Rediska/Pipeline.php
protected function _addCommand($name, $args = array())
    {
        if ($this->_oneTimeConnection) {
            $connection = $this->_oneTimeConnection;
            $this->_oneTimeConnection = null;
        } else {
            $connection = $this->_defaultConnection;
        }

        if ($connection !== null) {
            $this->_specifiedConnection->setConnection($connection);
        } else {
            $this->_specifiedConnection->resetConnection();
        }

        $command = Rediska_Commands::get($this->_rediska, $name, $args);
        $command->initialize();

        if (!$command->isAtomic()) {
            throw new Rediska_Exception("Command '$name' doesn't work properly (not atomic) in pipeline on multiple servers");
        }

        $this->_commands[] = $command;

        $this->_specifiedConnection->resetConnection();

        return $this;
    }
protected function _addCommand($name, $args = array())
    {
        if ($this->_oneTimeConnection) {
            $connection = $this->_oneTimeConnection;
            $this->_oneTimeConnection = null;
        } else {
            $connection = $this->_defaultConnection;
        }

        if ($connection !== null) {
            $this->_specifiedConnection->setConnection($connection);
        } else {
            $this->_specifiedConnection->resetConnection();
        }

        $command = Rediska_Commands::get($this->_rediska, $name, $args);
        $command->initialize();

        if (!$command->isAtomic()) {
            throw new Rediska_Exception("Command '$name' doesn't work properly (not atomic) in pipeline on multiple servers");
        }

        $this->_commands[] = $command;

        $this->_specifiedConnection->resetConnection();

        return $this;
    }
Add command to pipeline

@param string $name Command name
@param array  $args Arguments
@return Rediska_Pipeline