Property | Type | Description | |
---|---|---|---|
$application | Application to complete for | ||
$command | |||
$context | |||
$helpers | Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface[] | Array of completion helpers. |
Method | Description | |
---|---|---|
__construct ( |
||
addHandler ( Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface $helper ) | ||
addHandlers ( array $array ) | ||
getContext ( ) : |
||
getInput ( ) : Symfony\Component\Console\Input\ArrayInput | Get an InputInterface representation of the completion context | |
runCompletion ( ) : string[] | Do the actual completion, returning an array of strings to provide to the parent shell's completion system | |
setContext ( |
Method | Description | |
---|---|---|
completeForCommandArguments ( ) : array | false | Attempt to complete the current word as a command argument value | |
completeForCommandName ( ) : array | false | Attempt to complete the current word as a command name | |
completeForOptionShortcutValues ( ) : array | false | Attempt to complete the current word as the value of an option shortcut | |
completeForOptionShortcuts ( ) : array | false | Attempt to complete the current word as an option shortcut. | |
completeForOptionValues ( ) : array | false | Attemp to complete the current word as the value of a long-form option | |
completeForOptions ( ) : array | false | Attempt to complete the current word as a long-form option (--my-option) | |
completeOption ( Symfony\Component\Console\Input\InputOption $option ) : array | false | Complete the value for the given option if a value completion is availble | |
filterResults ( array $array ) : string[] | Filter out results that don't match the current word on the command line | |
getAllOptions ( ) : Symfony\Component\Console\Input\InputOption[] | Get the combined options of the application and entered command | |
getCompletionHelper ( string $name, string $type ) : Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface | null | Find a CompletionInterface that matches the current command, target name, and target type | |
getOptionWordsWithValues ( ) : string[] | Build a list of option words/flags that will have a value after them Options are returned in the format they appear as on the command line. | |
mapArgumentsToWords ( Symfony\Component\Console\Input\InputArgument[] $argumentDefinitions ) : array | Step through the command line to determine which word positions represent which argument values |
public __construct ( |
||
$application | ||
$context |
public addHandler ( Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface $helper ) | ||
$helper | Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface |
protected completeForCommandArguments ( ) : array | false | ||
return | array | false |
protected completeForCommandName ( ) : array | false | ||
return | array | false |
protected completeForOptionShortcutValues ( ) : array | false | ||
return | array | false |
protected completeForOptionShortcuts ( ) : array | false | ||
return | array | false |
protected completeForOptionValues ( ) : array | false | ||
return | array | false |
protected completeForOptions ( ) : array | false | ||
return | array | false |
protected completeOption ( Symfony\Component\Console\Input\InputOption $option ) : array | false | ||
$option | Symfony\Component\Console\Input\InputOption | |
return | array | false |
protected filterResults ( array $array ) : string[] | ||
$array | array | |
return | string[] |
protected getAllOptions ( ) : Symfony\Component\Console\Input\InputOption[] | ||
return | Symfony\Component\Console\Input\InputOption[] |
public getInput ( ) : Symfony\Component\Console\Input\ArrayInput | ||
return | Symfony\Component\Console\Input\ArrayInput |
protected getOptionWordsWithValues ( ) : string[] | ||
return | string[] | - eg. ['--myoption', '-m', ... ] |
protected mapArgumentsToWords ( Symfony\Component\Console\Input\InputArgument[] $argumentDefinitions ) : array | ||
$argumentDefinitions | Symfony\Component\Console\Input\InputArgument[] | |
return | array | as [argument name => word index on command line] |
public runCompletion ( ) : string[] | ||
return | string[] |
public setContext ( |
||
$context |
protected Application,Symfony\Component\Console $application | ||
return |
protected Command,Symfony\Component\Console\Command $command | ||
return |
protected CompletionContext,Stecman\Component\Symfony\Console\BashCompletion $context | ||
return |