setShortName() 공개 메소드

The short name must consist of a single letter. The short name is preceded by a single dash "-" when calling the command: $ server -d localhost In the example above, "d" is the short name of the "server --delete" command.
public setShortName ( string $shortName ) : static
$shortName string The short option name.
리턴 static The current instance.
예제 #1
0
 public function testBuildAnonymousArgsFormat()
 {
     $baseFormat = new ArgsFormat();
     $this->config->setName('command');
     $this->config->setShortName('c');
     $this->config->setAliases(array('alias1', 'alias2'));
     $this->config->addOption('option');
     $this->config->addArgument('argument');
     $this->config->markAnonymous();
     $expected = ArgsFormat::build($baseFormat)->addArgument(new Argument('argument'))->addOption(new Option('option'))->getFormat();
     $this->assertEquals($expected, $this->config->buildArgsFormat($baseFormat));
 }