The parser transforms a CLI (a model) into an @see \io\vertx\jphp\core\cli\CommandLine. This @see \io\vertx\jphp\core\cli\CommandLine has stored the argument and option values. Only instance of parser should create objects of this type.
| package |
Default |
|---|
__construct()
acceptMoreValues( $arg0) : boolean
array | Option
boolean{@link true} if the option accepts more values, {@link false} otherwise.
allArguments() : array
arraythe ordered list of arguments. Arguments are command line arguments not matching an option.
cli() : \io\vertx\jphp\core\cli\CLI
create( $arg0) : \io\vertx\jphp\core\cli\CommandLine
getArgumentValue( $arg0) : mixed
param $name [string] the name getArgumentValue($name)
Gets the value of an argument with the given index.
param $index [integer] the index getArgumentValue($index)
string | integer
mixedthe value, {@code null} if not set
getOptionValue( $arg0) : mixed
string
mixedthe value, {@code null} if not set
getRawValueForArgument( $arg0) : string
Argument | array
stringthe value, {@code null} if none.
getRawValueForOption( $arg0) : string
array | Option
stringthe value, {@code null} if none.
getRawValues( $arg0) : array
| deprecated |
|---|
array | Option
arraythe list of values, empty if none
getRawValuesForArgument( $arg0) : array
Argument | array
arraythe list of values, empty if none
getRawValuesForOption( $arg0) : array
array | Option
arraythe list of values, empty if none
isArgumentAssigned( $arg0) : boolean
Argument | array
boolean{@code true} if the argument has received a value, {@link false} otherwise.
isAskingForHelp() : boolean
boolean{@code true} if the user command line has enabled a "Help" option, {@link false} otherwise.
isFlagEnabled( $arg0) : boolean
Calling this method an a non-flag option throws an \java.lang.IllegalStateException.
string
boolean{@code true} if the flag has been set in the command line, {@code false} otherwise.
isOptionAssigned( $arg0) : boolean
array | Option
boolean{@code true} if the option has received a value, {@link false} otherwise.
isSeenInCommandLine( $arg0) : boolean
array | Option
boolean{@code true} if the user command line has used the option
isValid() : boolean
boolean{@code true} if the current {@link CommandLine} object is valid. {@link false} otherwise.