Метод | Описание | |
---|---|---|
__construct ( |
Creates a new builder. | |
addArgument ( |
Adds an argument at the end of the argument list. | |
addArguments ( array $arguments ) : static | Adds arguments at the end of the argument list. | |
addCommandName ( |
Adds a command name to the built format. | |
addCommandNames ( array $commandNames ) : static | Adds command names to the built format. | |
addCommandOption ( |
Adds a command option to the builder. | |
addCommandOptions ( array $commandOptions ) : static | Adds command options to the builder. | |
addOption ( |
Adds an option at the end of the options list. | |
addOptions ( array $options ) : static | Adds options at the end of the options list. | |
getArgument ( string | integer $name, boolean $includeBase = true ) : |
Returns an argument by its name or position. | |
getArguments ( boolean $includeBase = true ) : |
Returns all arguments added to the builder. | |
getBaseFormat ( ) : |
Returns the base format. | |
getCommandNames ( boolean $includeBase = true ) : |
Returns all command names added to the builder. | |
getCommandOption ( string $name, boolean $includeBase = true ) : |
Returns a command option by its long or short name. | |
getCommandOptions ( boolean $includeBase = true ) : |
Returns all command options added to the builder. | |
getFormat ( ) : |
Builds a format with the arguments and options added to the builder. | |
getOption ( string $name, boolean $includeBase = true ) : |
Returns an option by its long or short name. | |
getOptions ( boolean $includeBase = true ) : |
Returns all options added to the builder. | |
hasArgument ( string | integer $name, boolean $includeBase = true ) : boolean | Returns whether the builder contains a specific argument. | |
hasArguments ( boolean $includeBase = true ) : boolean | Returns whether the builder contains any argument. | |
hasCommandNames ( boolean $includeBase = true ) : boolean | Returns whether the builder contains any command names. | |
hasCommandOption ( string $name, boolean $includeBase = true ) : boolean | Returns whether the builder contains a specific command option. | |
hasCommandOptions ( boolean $includeBase = true ) : boolean | Returns whether the builder contains any command options. | |
hasMultiValuedArgument ( boolean $includeBase = true ) : boolean | Returns whether the builder contains a multi-valued argument. | |
hasOption ( string $name, boolean $includeBase = true ) : boolean | Returns whether the builder contains a specific option. | |
hasOptionalArgument ( boolean $includeBase = true ) : boolean | Returns whether the builder contains an optional argument. | |
hasOptions ( boolean $includeBase = true ) : boolean | Returns whether the builder contains any option. | |
hasRequiredArgument ( boolean $includeBase = true ) : boolean | Returns whether the builder contains a required argument. | |
setArguments ( array $arguments ) : static | Sets the arguments of the built format. | |
setCommandNames ( array $commandNames ) : static | Sets the command names of the built format. | |
setCommandOptions ( array $commandOptions ) : static | Sets the command options of the built format. | |
setOptions ( array $options ) : static | Sets the options of the built format. |
public __construct ( |
||
$baseFormat | The base format. |
public addArgument ( |
||
$argument | The argument to add. | |
Результат | static | The current instance. |
public addArguments ( array $arguments ) : static | ||
$arguments | array | The arguments to add. |
Результат | static | The current instance. |
public addCommandName ( |
||
$commandName | The command name to add. | |
Результат | static | The current instance. |
public addCommandNames ( array $commandNames ) : static | ||
$commandNames | array | The command names to add. |
Результат | static | The current instance. |
public addCommandOption ( |
||
$commandOption | The command option to add. | |
Результат | static | The current instance. |
public addCommandOptions ( array $commandOptions ) : static | ||
$commandOptions | array | The command options to add. |
Результат | static | The current instance. |
public addOption ( |
||
$option | The option to add. | |
Результат | static | The current instance. |
public addOptions ( array $options ) : static | ||
$options | array | The options to add. |
Результат | static | The current instance. |
public getArguments ( boolean $includeBase = true ) : |
||
$includeBase | boolean | Whether to include arguments of the base format in the result. |
Результат | The arguments. |
public getBaseFormat ( ) : |
||
Результат | The base format. |
public getCommandNames ( boolean $includeBase = true ) : |
||
$includeBase | boolean | Whether to include command names of the base format in the result. |
Результат | The command names. |
public getCommandOption ( string $name, boolean $includeBase = true ) : |
||
$name | string | The long or short option name. |
$includeBase | boolean | Whether to include command options in the base format in the search. |
Результат | The command option. |
public getCommandOptions ( boolean $includeBase = true ) : |
||
$includeBase | boolean | Whether to include command options of the base format in the result. |
Результат | The command options. |
public getFormat ( ) : |
||
Результат | The built format. |
public getOptions ( boolean $includeBase = true ) : |
||
$includeBase | boolean | Whether to include options of the base format in the result. |
Результат | The options. |
public hasArgument ( string | integer $name, boolean $includeBase = true ) : boolean | ||
$name | string | integer | The argument name or its 0-based position in the argument list. |
$includeBase | boolean | Whether to include arguments in the base format in the search. |
Результат | boolean | Returns `true` if the argument with the given name or position could be found and `false` otherwise. |
public hasArguments ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include arguments in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains any argument and `false` otherwise. |
public hasCommandNames ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to consider command names of the base format. |
Результат | boolean | Returns `true` if the builder contains any command names and `false` otherwise. |
public hasCommandOption ( string $name, boolean $includeBase = true ) : boolean | ||
$name | string | The long or short option name. |
$includeBase | boolean | Whether to include command options in the base format in the search. |
Результат | boolean | Returns `true` if the command option with the given name could be found and `false` otherwise. |
public hasCommandOptions ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include command options in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains command options and `false` otherwise. |
public hasMultiValuedArgument ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include arguments in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains a multi-valued argument and `false` otherwise. |
public hasOption ( string $name, boolean $includeBase = true ) : boolean | ||
$name | string | The long or short option name. |
$includeBase | boolean | Whether to include options in the base format in the search. |
Результат | boolean | Returns `true` if the option with the given name could be found and `false` otherwise. |
public hasOptionalArgument ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include arguments in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains an optional argument and `false` otherwise. |
public hasOptions ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include options in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains any option and `false` otherwise. |
public hasRequiredArgument ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to include arguments in the base format in the search. |
Результат | boolean | Returns `true` if the builder contains a required argument and `false` otherwise. |
public setArguments ( array $arguments ) : static | ||
$arguments | array | The arguments of the built format. |
Результат | static | The current instance. |
public setCommandNames ( array $commandNames ) : static | ||
$commandNames | array | The command names. |
Результат | static | The current instance. |
public setCommandOptions ( array $commandOptions ) : static | ||
$commandOptions | array | The command options of the built format. |
Результат | static | The current instance. |
public setOptions ( array $options ) : static | ||
$options | array | The options of the built format. |
Результат | static | The current instance. |