OptionSet
class
OptionSet
A set of options.
- Copyright
- 2016 Appertly contributors
- License
- MIT
Constructors / Destructors
Returns | Signature and Description |
---|---|
void | __construct ( )Creates a new OptionSet. |
Instance Methods
Returns | Signature and Description |
---|---|
OptionSet | Combines this OptionSet with another. |
string | getHelp ()Gets a formatted help string for the option set. |
? Option | getOption ( )Gets an Option by label. |
ImmVector <Option > | Gets the options. |
Method Details
__construct
public function
__construct
(Option
... $options
)Creates a new OptionSet.
Name | Type | Description |
---|---|---|
$options | Option | The options to add |
Type | Conditions |
---|---|
InvalidArgumentException | if any option labels collide |
combine
public function
combine
(OptionSet
$other
)getHelp
public function
getHelp
()Gets a formatted help string for the option set.
Type | Description |
---|---|
string | a formatted help string |
getOption
public function
getOption
(string
$label
)Gets an Option by label.
Name | Type | Description |
---|---|---|
$label | string | The label |
Type | Description |
---|---|
? Option | The option found or null |
getOptions
public function
getOptions
()Gets the options.
Type | Description |
---|---|
ImmVector <Option > | The options |