Exemplo n.º 1
0
 /**
  * Executes the transformation process.
  *
  * @throws Zend_Console_Getopt_Exception
  *
  * @return void
  */
 public function execute()
 {
     // initialize timer
     $timer = microtime(true);
     // initialize transformer
     $transformer = new DocBlox_Transformer();
     $transformer->setTarget($this->getTarget());
     $transformer->setSource($this->getSource());
     $transformer->setTemplates($this->getTemplate());
     // enable verbose mode if the flag was set
     if ($this->getVerbose()) {
         $transformer->setLogLevel(DocBlox_Core_Log::DEBUG);
     }
     if ($this->getQuiet()) {
         $transformer->setLogLevel(DocBlox_Core_Log::QUIET);
     }
     // start the transformation process
     if (!$this->getQuiet()) {
         echo 'Starting transformation of files (this could take a while depending upon the size of your project)' . PHP_EOL;
     }
     $transformer->execute();
     if (!$this->getQuiet()) {
         echo 'Finished transformation in ' . round(microtime(true) - $timer, 2) . ' seconds' . PHP_EOL;
     }
 }