-
Notifications
You must be signed in to change notification settings - Fork 24
Option Default Value
Yo-An Lin edited this page Apr 23, 2015
·
1 revision
To define a default value of an option, you can use the defaultValue
accessor:
$specs->add('o|output?', 'option with optional value.' )
->isa('File')
->defaultValue('output.txt')
;
Once you defined the default value, the options with default value will be set to the default value before the parser parse everything from the command line.
Related Works:
- CLIFramework: https://github.com/c9s/CLIFramework
Applications using GetOptionKit and CLIFramework:
- PHPBrew: https://github.com/phpbrew/phpbrew
- LazyRecord: https://github.com/c9s/LazyRecord
- PHPRelease: https://github.com/c9s/PHPRelease
- AssetKit: https://github.com/c9s/AssetKit
- Onion: https://github.com/c9s/Onion