예제 #1
0
파일: Help.php 프로젝트: halfer/Meshing
 /**
  * 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();
     }
 }
예제 #2
0
파일: Commands.php 프로젝트: halfer/Meshing
 public function run()
 {
     $commands = Meshing_Console_Utils::getCommands($this->opts->hidden);
     $this->listCommands($commands);
 }