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
Help
class - Custom help formatter class through
Getopt::setHelp()
- Pass
Argument
inOption
constructor - Argument mode
MULTIPLE_ARGUMENT
added - 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
Getopt
constructor 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