예제 #1
0
파일: Exec.php 프로젝트: robertbasic/usher
 /**
  * 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());
     }
 }
예제 #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)');
     }
 }