PHP 클래스 Webmozart\Console\Api\Args\Format\AbstractOption

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

보호된 프로퍼티들

프로퍼티 타입 설명
$flags integer

공개 메소드들

메소드 설명
__construct ( string $longName, string | null $shortName = null, integer $flags, string $description = null ) Creates a new option.
getDescription ( ) : string Returns the description text.
getLongName ( ) : string Returns the long option name.
getShortName ( ) : string Returns the short option name.
isLongNamePreferred ( ) : boolean Returns whether using the long name is preferred over using the short name.
isShortNamePreferred ( ) : boolean Returns whether using the short name is preferred over using the long name.

비공개 메소드들

메소드 설명
addDefaultFlags ( &$flags )
assertFlagsValid ( $flags )
assertLongNameValid ( $longName )
assertShortNameValid ( $shortName, $flags )
removeDashPrefix ( $string )
removeDoubleDashPrefix ( $string )

메소드 상세

__construct() 공개 메소드

Creates a new option.
public __construct ( string $longName, string | null $shortName = null, integer $flags, string $description = null )
$longName string The long option name.
$shortName string | null The short option name.
$flags integer A bitwise combination of the option flag constants.
$description string A human-readable description of the option.

getDescription() 공개 메소드

Returns the description text.
public getDescription ( ) : string
리턴 string The description text.

getLongName() 공개 메소드

The long name is prefixed with a double dash ("--") on the console.
public getLongName ( ) : string
리턴 string The long name.

getShortName() 공개 메소드

The short name is prefixed with a single dash ("-") on the console. The short name always consists of one character only.
public getShortName ( ) : string
리턴 string The short name.

isLongNamePreferred() 공개 메소드

Returns whether using the long name is preferred over using the short name.
public isLongNamePreferred ( ) : boolean
리턴 boolean Returns `true` if the long name is preferred over the short name.

isShortNamePreferred() 공개 메소드

Returns whether using the short name is preferred over using the long name.
public isShortNamePreferred ( ) : boolean
리턴 boolean Returns `true` if the short name is preferred over the long name.

프로퍼티 상세

$flags 보호되어 있는 프로퍼티

protected int $flags
리턴 integer