示例#1
0
 public function run()
 {
     $this->_arguments->parse();
     /*
      * Set application verbosity based on flags
      */
     self::$_stdout->setApplicationVerbosity(Writer::VERBOSITY_NORMAL);
     if ($this->_arguments->flags['q']->getValue()) {
         self::$_stdout->setApplicationVerbosity(Writer::VERBOSITY_QUIET);
     } else {
         if ($this->_arguments->flags['v']->getValue()) {
             self::$_stdout->setApplicationVerbosity(Writer::VERBOSITY_VERBOSE);
         }
     }
     $parsedCommands = $this->_arguments->getParsedCommands();
     if (count($parsedCommands) === 1) {
         $this->_callApplication($parsedCommands[0]);
     } else {
         if ($this->_arguments->flags['V']->getExists()) {
             $this->_displayVersionInformation();
         } else {
             $this->_buildHelpScreen();
         }
     }
     $this->shutdown();
 }