public function getCommand($name = null)
    {
        if ($name !== null) {
            return isset($this->commands[$name]) ? $this->commands[$name] : null;
        }

        return $this->command;
    }
public function getCommand($name = null)
    {
        if ($name !== null) {
            return isset($this->commands[$name]) ? $this->commands[$name] : null;
        }

        return $this->command;
    }
public function getCommand ( $ name = null ) { if ( $ name !== null ) { return isset ( $ this -> commands [ $ name ] ) ? $ this -> commands [ $ name ] : null ; } return $ this -> command ; }
Get the current or a named command.

@param string $name
@return Command
Get the current or a named command .