Symfony\Component\Console\Command\Command::addOption
Adds an option.
Signature
public function addOption(string
$name,
[string
$shortcut = null,
[integer
$mode = null,
[string
$description = '',
[mixed
$default = null]]]] )
Parameters
$name
—
string
- The option name
$shortcut
—
string
- The shortcut (can be null)
$mode
—
integer
- The option mode: One of the InputOption::VALUE_* constants
$description
—
string
- A description text
$default
—
mixed
- The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE)
Returns
- Command
- The current instance