InputOption
class InputOption
Represents a command line option.
Constants
VALUE_NONE |
|
VALUE_REQUIRED |
|
VALUE_OPTIONAL |
|
VALUE_IS_ARRAY |
|
Methods
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.
Details
at line line 46
__construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null)
Constructor.
at line line 96
string
getShortcut()
Returns the option shortcut.
at line line 106
string
getName()
Returns the option name.
at line line 116
bool
acceptValue()
Returns true if the option accepts a value.
at line line 126
bool
isValueRequired()
Returns true if the option requires a value.
at line line 136
bool
isValueOptional()
Returns true if the option takes an optional value.
at line line 146
bool
isArray()
Returns true if the option can take multiple values.
at line line 158
setDefault(mixed $default = null)
Sets the default value.
at line line 180
mixed
getDefault()
Returns the default value.
at line line 190
string
getDescription()
Returns the description text.
at line line 202
bool
equals(InputOption $option)
Checks whether the given option equals this one.