class InputOption
Represents a command line option.
VALUE_NONE | |
VALUE_REQUIRED | |
VALUE_OPTIONAL | |
VALUE_IS_ARRAY |
__construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null) Constructor. | ||
string | getShortcut() Returns the option shortcut. | |
string | getName() Returns the option name. | |
bool | acceptValue() Returns true if the option accepts a value. | |
bool | isValueRequired() Returns true if the option requires a value. | |
bool | isValueOptional() Returns true if the option takes an optional value. | |
bool | isArray() Returns true if the option can take multiple values. | |
setDefault(mixed $default = null) Sets the default value. | ||
mixed | getDefault() Returns the default value. | |
string | getDescription() Returns the description text. | |
bool | equals(InputOption $option) Checks whether the given option equals this one. |
Constructor.
Returns the option shortcut.
Returns the option name.
Returns true if the option accepts a value.
Returns true if the option requires a value.
Returns true if the option takes an optional value.
Returns true if the option can take multiple values.
Sets the default value.
Returns the default value.
Returns the description text.
Checks whether the given option equals this one.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Console/Input/InputOption.html