Refactoring of help and parse
Created by: tflori
Several improvements to the code are now possible. Also we improved some things already with this refactoring:
- Custom templates for usage and options through
Helpclass - Custom help formatter class through
Getopt::setHelp() - Pass
ArgumentinOptionconstructor - Argument mode
MULTIPLE_ARGUMENTadded - Padding determined automatically (through default template)
- Line length determined automatically and description indented (through default template)
- Allowing
?!§$%#as short option names
This refactoring also brings some breaking changes:
- The second parameter for
Getoptconstructor is now an array of settings -
Getopt::setBanner()andGetopt::getBanner()are removed - Options can't be overwritten instead you have to get the option instance and change it