Symfony\Component\Console\Input\InputOption::__construct
Constructor.
Signature
public function __construct(string
$name,
[string|array
$shortcut = null,
[integer
$mode = null,
[string
$description = '',
[mixed
$default = null]]]] )
Parameters
$name
—
string
- The option name
$shortcut
—
object
- The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
$mode
—
integer
- The option mode: One of the VALUE_* constants
$description
—
string
- A description text
$default
—
mixed
- The default value (must be null for self::VALUE_REQUIRED or self::VALUE_NONE)
Errors/Exceptions
-
InvalidArgumentException
- If option mode is invalid or incompatible