setCommandOptions() 공개 메소드

Any existing command options are removed when this method is called.
또한 보기: addCommandOption()
public setCommandOptions ( array $commandOptions ) : static
$commandOptions array The command options of the built format.
리턴 static The current instance.
예제 #1
0
 public function testSetCommandOptions()
 {
     $this->builder->addCommandOption($option1 = new CommandOption('option1'));
     $this->builder->setCommandOptions(array($option2 = new CommandOption('option2'), $option3 = new CommandOption('option3')));
     $this->assertSame(array($option2, $option3), $this->builder->getCommandOptions());
 }