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$_name protected string$_short protected string__construct( string|array $name , string $short '' , string $help '' , boolean $boolean false , string $default '' , array $choices [] )
Make a new Input Option
$name $short optional '' $help optional '' $boolean optional false $default optional '' $choices optional [] Cake\Console\Exception\ConsoleExceptionhelp( 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\ConsoleExceptionxml( 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–2016 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.
http://api.cakephp.org/3.2/class-Cake.Console.ConsoleInputOption.html