public function InputDefinition::getOption in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Input/InputDefinition.php \Symfony\Component\Console\Input\InputDefinition::getOption()
Returns an InputOption by name.
Parameters
string $name The InputOption name:
Return value
InputOption A InputOption object
Throws
\InvalidArgumentException When option given doesn't exist
1 call to InputDefinition::getOption()
- InputDefinition::getOptionForShortcut in vendor/
symfony/ console/ Input/ InputDefinition.php - Gets an InputOption by shortcut.
File
- vendor/
symfony/ console/ Input/ InputDefinition.php, line 273
Class
- InputDefinition
- A InputDefinition represents a set of valid command line arguments and options.
Namespace
Symfony\Component\Console\InputCode
public function getOption($name) {
if (!$this
->hasOption($name)) {
throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name));
}
return $this->options[$name];
}