PHP 클래스 Webmozart\Console\Api\Config\OptionCommandConfig

부터: 1.0
저자: Bernhard Schussek ([email protected])
상속: extends SubCommandConfig
파일 보기 프로젝트 열기: webmozart/console 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $name = null, string $shortName = null, CommandConfig $parentConfig = null, ApplicationConfig $applicationConfig = null ) Creates a new configuration.
buildArgsFormat ( ArgsFormat $baseFormat = null )
getLongName ( ) : string Alias of {@link getName()}.
getShortName ( ) : string Returns the short option name of the command.
isLongNamePreferred ( ) : boolean Returns whether the long name should be preferred over the short name.
isShortNamePreferred ( ) : boolean Returns whether the short name should be preferred over the long name.
setLongName ( string $name ) : static Alias of {@link setName()}.
setName ( string $name ) : static Sets the name of the command.
setPreferLongName ( ) : static Marks the long name to be preferred over the short name.
setPreferShortName ( ) : static Marks the short name to be preferred over the long name.
setShortName ( string $shortName ) : static Sets the short option name of the command.

메소드 상세

__construct() 공개 메소드

Creates a new configuration.
public __construct ( string $name = null, string $shortName = null, CommandConfig $parentConfig = null, ApplicationConfig $applicationConfig = null )
$name string The long option name of the command.
$shortName string The short option name of the command.
$parentConfig CommandConfig The parent configuration.
$applicationConfig ApplicationConfig The application configuration.

buildArgsFormat() 공개 메소드

public buildArgsFormat ( ArgsFormat $baseFormat = null )
$baseFormat Webmozart\Console\Api\Args\Format\ArgsFormat

getLongName() 공개 메소드

Alias of {@link getName()}.
public getLongName ( ) : string
리턴 string The command name.

getShortName() 공개 메소드

Returns the short option name of the command.
public getShortName ( ) : string
리턴 string The short option name.

isLongNamePreferred() 공개 메소드

If no preference was set, the short name is preferred by default if one is set. If no short name is set, the long name is preferred by default.
public isLongNamePreferred ( ) : boolean
리턴 boolean Returns `true` if the long name should be preferred over the short name.

isShortNamePreferred() 공개 메소드

If no preference was set, the short name is preferred by default if one is set. If no short name is set, the long name is preferred by default.
public isShortNamePreferred ( ) : boolean
리턴 boolean Returns `true` if the short name should be preferred over the long name.

setLongName() 공개 메소드

Alias of {@link setName()}.
public setLongName ( string $name ) : static
$name string The command name.
리턴 static The current instance.

setName() 공개 메소드

Contrary to the base implementation, the name of an option command must contain at least two characters.
public setName ( string $name ) : static
$name string The name of the command.
리턴 static The current instance.

setPreferLongName() 공개 메소드

This information is mainly used in the help where the preferred name is listed before alternative names.
public setPreferLongName ( ) : static
리턴 static The current instance.

setPreferShortName() 공개 메소드

This information is mainly used in the help where the preferred name is listed before alternative names.
public setPreferShortName ( ) : static
리턴 static The current instance.

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.