PHP Класс Webmozart\Console\Api\Args\Format\AbstractOption

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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