function CompleteCommand::createCompletionInput
1 call to CompleteCommand::createCompletionInput()
- CompleteCommand::execute in vendor/
symfony/ console/ Command/ CompleteCommand.php - Executes the current command.
File
-
vendor/
symfony/ console/ Command/ CompleteCommand.php, line 171
Class
- CompleteCommand
- Responsible for providing the values to the shell completion.
Namespace
Symfony\Component\Console\CommandCode
private function createCompletionInput(InputInterface $input) : CompletionInput {
$currentIndex = $input->getOption('current');
if (!$currentIndex || !ctype_digit($currentIndex)) {
throw new \RuntimeException('The "--current" option must be set and it must be an integer.');
}
$completionInput = CompletionInput::fromTokens($input->getOption('input'), (int) $currentIndex);
try {
$completionInput->bind($this->getApplication()
->getDefinition());
} catch (ExceptionInterface) {
}
return $completionInput;
}