+ $parser->addCommand(
+ 'config', array(
+ 'description' => 'Extract configuration file'
+ )
+ );
+
+ return $parser;
+ }
+
+ protected function handleCommands($res)
+ {
+ if ($res->command_name == '') {
+ return;
+ } else if ($res->command_name == 'readme') {
+ $this->showReadme();
+ } else if ($res->command_name == 'config') {
+ $this->extractConfig();
+ } else {
+ throw new \Exception('Unknown command');
+ }
+ }