Change the Core_Daemon::getopt() method to write to these arrays. Change the show_help() method to just implode these arrays and print them with a similar format to the existing code.
This will enable application developers to parse their own command line options by overloading getopt (and calling parent::getopt() when they're done), while writing help instructions that get displayed alongside the library-specific instructions.
Refactor the
Core_Daemon::show_help()
method to work likeshow_install_instructions()
.Create two instance vars on
Core_Daemon
:Change the
Core_Daemon::getopt()
method to write to these arrays. Change theshow_help()
method to just implode these arrays and print them with a similar format to the existing code.This will enable application developers to parse their own command line options by overloading getopt (and calling parent::getopt() when they're done), while writing help instructions that get displayed alongside the library-specific instructions.