Beispiel #1
0
 /**
  * Execute the task
  *
  * @throws Exception
  * @return void
  */
 public function execute()
 {
     $command = $this->getOption('command');
     try {
         \Lib\Console\Execute::run($command);
     } catch (\Exception $e) {
         throw new \Exception('Error on command: ' . $e->getMessage());
     }
 }
Beispiel #2
0
 /**
  * Execute the task
  *
  * @throws Exception
  * @return void
  */
 public function execute()
 {
     // get the project basedir
     $projectDir = $this->getProjectOption('projectBase');
     if ($projectDir != null && is_dir($projectDir)) {
         $exec = 'php -l ' . $projectDir;
         \Lib\Console\Execute::run($exec);
     } else {
         throw new \Exception('Could not determine project directory (projectBase)');
     }
 }