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, integer $mode = null, string $description = '', mixed $default = null)
Constructor. |
||
| string |
getShortcut()
Returns the option shortcut. |
|
| string |
getName()
Returns the option name. |
|
| Boolean |
acceptValue()
Returns true if the option accepts a value. |
|
| Boolean |
isValueRequired()
Returns true if the option requires a value. |
|
| Boolean |
isValueOptional()
Returns true if the option takes an optional value. |
|
| Boolean |
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. |
|
| Boolean |
equals(InputOption $option)
Checks whether the given option equals this one |
Details
at line 47
public
__construct(string $name, string|array $shortcut = null, integer $mode = null, string $description = '', mixed $default = null)
Constructor.
at line 97
public string
getShortcut()
Returns the option shortcut.
at line 107
public string
getName()
Returns the option name.
at line 117
public Boolean
acceptValue()
Returns true if the option accepts a value.
at line 127
public Boolean
isValueRequired()
Returns true if the option requires a value.
at line 137
public Boolean
isValueOptional()
Returns true if the option takes an optional value.
at line 147
public Boolean
isArray()
Returns true if the option can take multiple values.
at line 159
public
setDefault(mixed $default = null)
Sets the default value.
at line 181
public mixed
getDefault()
Returns the default value.
at line 191
public string
getDescription()
Returns the description text.
at line 202
public Boolean
equals(InputOption $option)
Checks whether the given option equals this one