You are here

private function InputDefinition::shortcutToName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/InputDefinition.php \Symfony\Component\Console\Input\InputDefinition::shortcutToName()

Returns the InputOption name given a shortcut.

Parameters

string $shortcut The shortcut:

Return value

string The InputOption name

Throws

\InvalidArgumentException When option given does not exist

1 call to InputDefinition::shortcutToName()
InputDefinition::getOptionForShortcut in vendor/symfony/console/Input/InputDefinition.php
Gets an InputOption by shortcut.

File

vendor/symfony/console/Input/InputDefinition.php, line 352

Class

InputDefinition
A InputDefinition represents a set of valid command line arguments and options.

Namespace

Symfony\Component\Console\Input

Code

private function shortcutToName($shortcut) {
  if (!isset($this->shortcuts[$shortcut])) {
    throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut));
  }
  return $this->shortcuts[$shortcut];
}