public function add(Command $cmd, $mode = RUN_REGARDLESS, $pipe = false)
    {
        $cmd->_runMode = $mode;
        $cmd->_pipe = !!$pipe;
        $this->commands[] = $cmd;

        return $this;
    }
public function add(Command $cmd, $mode = RUN_REGARDLESS, $pipe = false)
    {
        $cmd->_runMode = $mode;
        $cmd->_pipe = !!$pipe;
        $this->commands[] = $cmd;

        return $this;
    }
public function add ( Command $ cmd , $ mode = RUN_REGARDLESS , $ pipe = false ) { $ cmd -> _runMode = $ mode ; $ cmd -> _pipe = ! ! $ pipe ; $ this -> commands [ ] = $ cmd ; return $ this ; }
Adds a new command to the chain

@param  Command $cmd  The command object to add
@param  int     $mode [optional] one of the following constants:
RUN_IF_PREVIOUS_SUCCEEDS Only run if the previous command is successful (returns exitcode 0)
RUN_IF_PREVIOUS_FAILS Only run if the previous command fails (returns exitcode != 0)
RUN_REGARDLESS - Default. Runs regardless of previous command exit code
@param  bool    $pipe [optional] If the output of the previous command should be piped to this one.
If set to true, it will look for an argument whose value is !!PIPE!! and replace it
with the previous command STDOUT. If none is found, it will pass the previous command
STDOUT as this command STDIN.
Default is false.
@return $this
Adds a new command to the chain