| Methods |
public
static
|
fromString(string $inputStr, int $currentIndex): self
Converts a terminal string into tokens.
Converts a terminal string into tokens.
This is required for shell completions without COMP_WORDS support.
|
#
|
public
static
|
fromTokens(string[] $tokens, int $currentIndex): self
Create an input based on an COMP_WORDS token list.
Create an input based on an COMP_WORDS token list.
Parameters
| $tokens |
the set of split tokens (e.g. COMP_WORDS or argv)
|
|
#
|
public
|
bind(InputDefinition $definition): void
Binds the current Input instance with the given arguments and options.
Binds the current Input instance with the given arguments and options.
Overrides
|
#
|
public
|
getCompletionType(): string
Returns the type of completion required.
Returns the type of completion required.
TYPE_ARGUMENT_VALUE when completing the value of an input argument
TYPE_OPTION_VALUE when completing the value of an input option
TYPE_OPTION_NAME when completing the name of an input option
TYPE_NONE when nothing should be completed
Returns
One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component
|
#
|
public
|
getCompletionName(): string|null
The name of the input option or argument when completing a value.
The name of the input option or argument when completing a value.
Returns
returns null when completing an option name
|
#
|
public
|
getCompletionValue(): string
The value already typed by the user (or empty string).
The value already typed by the user (or empty string).
|
#
|
public
|
mustSuggestOptionValuesFor(string $optionName): bool
|
#
|
public
|
mustSuggestArgumentValuesFor(string $argumentName): bool
|
#
|
protected
|
parseToken(string $token, bool $parseOptions): bool
|
#
|
private
|
getOptionFromToken(string $optionToken): ?InputOption
|
#
|
private
|
getRelevantToken(): string
The token of the cursor, or the last token if the cursor is at the end of the input.
The token of the cursor, or the last token if the cursor is at the end of the input.
|
#
|
private
|
isCursorFree(): bool
Whether the cursor is "free" (i.e. at the end of the input preceded by a space).
Whether the cursor is "free" (i.e. at the end of the input preceded by a space).
|
#
|
public
|
__toString()
Returns a stringified representation of the args passed to the command.
Returns a stringified representation of the args passed to the command.
Overrides
|
#
|