Class Option
Represents a command line option.
public
|
#
__construct( array $properties = null )
Initilize the option with an optional list of properties defined on an array. |
public
boolean
|
|
public
integer|string
|
|
public
boolean
|
public
string
|
$long_name | |
#
The human readable name of the option. Example: --use-something stored on this variable as use-something. |
public
string
|
$short_name | |
#
A one letter case-sensitive alias for the option. Example: -u stored on this variable as u. |
public
integer
|
$type | |
#
Data type of the option represented by one of the constants from \Peg\Custom\CommandLine\OptionType |
public
integer|string
|
$value | |
#
Current value of the option. |
public
integer|string
|
$default_value | |
#
A default value used in case the user didn't provided one and the option isn't marked as required. |
public
boolean
|
$active | |
#
Indicates if an option of type FLAG was passed on the command line. |
public
boolean
|
$required | |
#
Flag that indicates if the option is required or not. |
public
string
|
$description | |
#
Information displayed when the application is executed without options or with: -h, --help |