-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace webfiori\cli; | ||
|
||
/** | ||
* A class that holds the options which are used to configure command line argument. | ||
* | ||
* @author Ibrahim | ||
*/ | ||
class Option { | ||
/** | ||
* An option which is used to tell if the argument is optional or not. | ||
* Accepts 'true' or 'false' as its value. | ||
*/ | ||
const OPTIONAL = 'optional'; | ||
/** | ||
* An option which is used to set a default value for the argument if not | ||
* provided and it was optional. | ||
*/ | ||
const DEFAULT = 'default'; | ||
/** | ||
* Help text of the argument. Used when the command 'help' is executed. | ||
*/ | ||
const DESCRIPTION = 'description'; | ||
/** | ||
* An array of values at which the argument can accept. Used to restrict | ||
* the values that can be supplied to the argument. | ||
*/ | ||
const VALUES = 'values'; | ||
} |