Exemple #1
0
 /**
  * starts the command line interface for pFlow
  * @return void
  */
 public function run()
 {
     $this->setupInput();
     try {
         $this->input->process();
     } catch (\ezcConsoleOptionException $e) {
         die($e->getMessage() . "\nTry option -h to get a list of available options.\n");
     } catch (\ezcConsoleArgumentMandatoryViolationException $e) {
         die($e->getMessage() . "\nTry option -h to get a list of available options.\n");
     }
     if ($this->input->helpOptionSet()) {
         echo $this->input->getHelpText("\npFlow version " . self::VERSION . "\n\n" . "A tool for analysing control and data flow in PHP applications.");
     } else {
         // start generation
         $this->analyzer->setSources($this->input->getArguments(), $this->input->getOption('recursive')->value);
     }
 }