public function setCommandOptions(array $commandOptions)
    {
        $this->commandOptions = array();
        $this->commandOptionsByShortName = array();

        $this->addCommandOptions($commandOptions);

        return $this;
    }
public function setCommandOptions(array $commandOptions)
    {
        $this->commandOptions = array();
        $this->commandOptionsByShortName = array();

        $this->addCommandOptions($commandOptions);

        return $this;
    }
public function setCommandOptions ( array $ commandOptions ) { $ this -> commandOptions = array ( ) ; $ this -> commandOptionsByShortName = array ( ) ; $ this -> addCommandOptions ( $ commandOptions ) ; return $ this ; }
Sets the command options of the built format.

Any existing command options are removed when this method is called.

@param CommandOption[] $commandOptions The command options of the built
format.

@return static The current instance.

@throws CannotAddOptionException If an option cannot be added.

@see addCommandOption()
Sets the command options of the built format .