InputOption
class InputOption
Represents a command line option.
Constants
VALUE_NONE |
|
VALUE_REQUIRED |
|
VALUE_OPTIONAL |
|
VALUE_IS_ARRAY |
|
Methods
__construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', string|string[]|int|bool|null $default = null)
No description
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(string|string[]|int|bool|null $default = null)
Sets the default value.
string|string[]|int|bool|null
getDefault()
Returns the default value.
string
getDescription()
Returns the description text.
bool