Метод | Описание | |
---|---|---|
__construct ( array | |
Creates a new format. | |
build ( |
Returns a format builder. | |
getArgument ( string | integer $name, boolean $includeBase = true ) : |
Returns an argument by its name or position. | |
getArguments ( boolean $includeBase = true ) : |
Returns all arguments of the format. | |
getBaseFormat ( ) : |
Returns the base format. | |
getCommandNames ( boolean $includeBase = true ) : |
Returns the command names. | |
getCommandOption ( string $name, boolean $includeBase = true ) : |
Returns a command option by its long or short name. | |
getCommandOptions ( boolean $includeBase = true ) : |
Returns all command options of the format. | |
getNumberOfArguments ( boolean $includeBase = true ) : integer | Returns the number of arguments. | |
getNumberOfRequiredArguments ( boolean $includeBase = true ) : integer | Returns the number of required arguments. | |
getOption ( string $name, boolean $includeBase = true ) : |
Returns an option by its long or short name. | |
getOptions ( boolean $includeBase = true ) : |
Returns all options of the format. | |
hasArgument ( string | integer $name, boolean $includeBase = true ) : boolean | Returns whether the format contains a specific argument. | |
hasArguments ( boolean $includeBase = true ) : boolean | Returns whether the format contains any argument. | |
hasCommandNames ( boolean $includeBase = true ) : boolean | Returns whether the format contains any command names. | |
hasCommandOption ( string $name, boolean $includeBase = true ) : boolean | Returns whether the format contains a specific command option. | |
hasCommandOptions ( boolean $includeBase = true ) : boolean | Returns whether the format contains command options. | |
hasMultiValuedArgument ( boolean $includeBase = true ) : boolean | Returns whether the format contains a multi-valued argument. | |
hasOption ( string $name, boolean $includeBase = true ) : boolean | Returns whether the format contains a specific option. | |
hasOptionalArgument ( boolean $includeBase = true ) : boolean | Returns whether the format contains an optional argument. | |
hasOptions ( boolean $includeBase = true ) : boolean | Returns whether the format contains options. | |
hasRequiredArgument ( boolean $includeBase = true ) : boolean | Returns whether the format contains a required argument. |
Метод | Описание | |
---|---|---|
createBuilderForElements ( array $elements, |
Creates a format builder for a set of arguments and options. |
public __construct ( array | |
||
$elements | array | |
The arguments and options or a builder instance. |
$baseFormat | The format. |
public static build ( |
||
$baseFormat | The base format. | |
Результат | The created builder. |
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 in 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 options in the base format in the search. |
Результат | The command option. |
public getCommandOptions ( boolean $includeBase = true ) : |
||
$includeBase | boolean | Whether to include options of the base format in the result. |
Результат | The command options. |
public getNumberOfArguments ( boolean $includeBase = true ) : integer | ||
$includeBase | boolean | Whether to include arguments in the base format in the result. |
Результат | integer | The number of arguments. |
public getNumberOfRequiredArguments ( boolean $includeBase = true ) : integer | ||
$includeBase | boolean | Whether to include arguments in the base format in the result. |
Результат | integer | The number of required arguments. |
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 format contains any argument and `false` otherwise. |
public hasCommandNames ( boolean $includeBase = true ) : boolean | ||
$includeBase | boolean | Whether to consider command names in the base format. |
Результат | boolean | Returns `true` if the format contains 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 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 options in the base format in the search. |
Результат | boolean | Returns `true` if the format 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 format 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 format 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 format contains options 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 format contains a required argument and `false` otherwise. |