An input specialized for shell completion.
This input allows unfinished option names or values and exposes what kind of completion is expected.
- author Wouter de Jong
Constants |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
Methods |
public __toString() : string |
public bind(Symfony |
public static fromString(string $inputStr, int $currentIndex) : self Converts a terminal string into tokens. This is required for shell completions without COMP_WORDS support. |
public static fromTokens(array $tokens, int $currentIndex) : self Create an input based on an COMP_WORDS token list.
|
public getCompletionName() : ?string The name of the input option or argument when completing a value.
|
public getCompletionType() : string 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 TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component.
|
public getCompletionValue() : string The value already typed by the user (or empty string). |
public mustSuggestArgumentValuesFor(string $argumentName) : bool |
public mustSuggestOptionValuesFor(string $optionName) : bool |
Properties |
Methods |
protected parseToken(string $token, bool $parseOptions) : bool |
Properties |
private ?string $completionName = NULL |
private string $completionType |
private string $completionValue = '' |
private int $currentIndex |
private array $tokens |
Methods |
private getOptionFromToken(string $optionToken) : ?Symfony |
private getRelevantToken() : string 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). |
Methods |
public static fromString(string $inputStr, int $currentIndex) : self Converts a terminal string into tokens. This is required for shell completions without COMP_WORDS support. |
public static fromTokens(array $tokens, int $currentIndex) : self Create an input based on an COMP_WORDS token list.
|