An object to represent a single option used in the command line. ConsoleOptionParser creates these when you use addOption()
$_boolean
protected boolean
$_choices
protected array
$_default
protected mixed
$_help
protected string
$_multiple
protected boolean
$_name
protected string
$_short
protected string
__construct( string|array $name , string $short '' , string $help '' , boolean $boolean false , string $default '' , array $choices [] , boolean $multiple false )
Make a new Input Option
$name
$short
optional '' $help
optional '' $boolean
optional false $default
optional '' $choices
optional [] $multiple
optional false Cake\Console\Exception\ConsoleException
acceptsMultiple( )
Check if this option accepts multiple values.
help( integer $width 0 )
Generate the help for this this option.
$width
optional 0 name( )
Get the value of the name attribute.
short( )
Get the value of the short attribute.
validChoice( string $value )
Check that a value is a valid choice for this option.
$value
Cake\Console\Exception\ConsoleException
xml( SimpleXmlElement $parent )
Append the option's xml into the parent.
$parent
protected boolean
Is the option a boolean option. Boolean options do not consume a parameter.
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Console.ConsoleInputOption.html