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

The command names and command options determine which command is executed. In the example below, the console arguments contain the command name "server" and the command option "delete": $ console server --delete localhost $ console server -d localhost The last part "localhost" is the argument to the "server --delete" command.
С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Наследование: extends AbstractOption
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $longName, string | null $shortName = null, array $aliases = [], integer $flags, string $description = null ) Creates the command option.
getLongAliases ( ) : string[] Returns all long alias names.
getShortAliases ( ) : string[] Returns all short alias names.

Приватные методы

Метод Описание
assertLongAliasValid ( $alias )
assertShortAliasValid ( $alias )
removeDashPrefix ( $string )

Описание методов

__construct() публичный Метод

Creates the command option.
public __construct ( string $longName, string | null $shortName = null, array $aliases = [], integer $flags, string $description = null )
$longName string The long option name.
$shortName string | null The short option name.
$aliases array A list of alias names.
$flags integer A bitwise combination of the option flag constants.
$description string A human-readable description of the option.

getLongAliases() публичный Метод

Returns all long alias names.
public getLongAliases ( ) : string[]
Результат string[] The long alias names.

getShortAliases() публичный Метод

Returns all short alias names.
public getShortAliases ( ) : string[]
Результат string[] The short alias names.