/** * Provides either a command listing or specific command help * * @todo Expand internal help format to specify whether a boolean switch is mandatory */ public function run() { // Reads the commands dynamically from the file system $commands = Meshing_Console_Utils::getCommands(true); if (array_key_exists(0, $this->argv)) { $command = $this->argv[0]; if ($className = array_search($command, $commands)) { $this->commandHelp($className); } else { throw new Zend_Console_Getopt_Exception('Command not recognised (use no arguments to see list)'); } } else { $this->generalHelp(); } }
public function run() { $commands = Meshing_Console_Utils::getCommands($this->opts->hidden); $this->listCommands($commands); }