An object to represent a single option used in the command line. ConsoleOptionParser creates these when you use addOption()
Cake\Console\ConsoleOptionParser::addOption()
__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\ConsoleException
help( integer $width 0 )
Generate the help for this this option.
$width
optional 0 string
short( )
Get the value of the short attribute.
string
validChoice( string $value )
Check that a value is a valid choice for this option.
$value
boolean
Cake\Console\Exception\ConsoleException
xml( SimpleXmlElement $parent )
Append the option's xml into the parent.
$parent
SimpleXmlElement
© 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.1/class-Cake.Console.ConsoleInputOption.html