public function addCommands(array $commands)
    {
        $this->newCommands = \array_merge($this->newCommands, $commands);
        if (isset($this->shell)) {
            $this->doAddCommands();
        }
    }
public function addCommands(array $commands)
    {
        $this->newCommands = \array_merge($this->newCommands, $commands);
        if (isset($this->shell)) {
            $this->doAddCommands();
        }
    }
public function addCommands ( array $ commands ) { $ this -> newCommands = \ array_merge ( $ this -> newCommands , $ commands ) ; if ( isset ( $ this -> shell ) ) { $ this -> doAddCommands ( ) ; } }
Add commands to the Shell.

This will buffer new commands in the event that the Shell has not yet
been instantiated. This allows the user to specify commands in their
config rc file, despite the fact that their file is needed in the Shell
constructor.

@param array $commands
Add commands to the Shell .