function ArgvInput::addShortOption
Adds a short option value.
Throws
RuntimeException When option given doesn't exist
1 call to ArgvInput::addShortOption()
- ArgvInput::parseShortOption in vendor/
symfony/ console/ Input/ ArgvInput.php - Parses a short option.
File
-
vendor/
symfony/ console/ Input/ ArgvInput.php, line 208
Class
- ArgvInput
- ArgvInput represents an input coming from the CLI arguments.
Namespace
Symfony\Component\Console\InputCode
private function addShortOption(string $shortcut, mixed $value) : void {
if (!$this->definition
->hasShortcut($shortcut)) {
throw new RuntimeException(\sprintf('The "-%s" option does not exist.', $shortcut));
}
$this->addLongOption($this->definition
->getOptionForShortcut($shortcut)
->getName(), $value);
}