Exemplo n.º 1
0
 public function run($args)
 {
     $occPath = $this->locator->getPathToOccFile();
     $cmd = "php {$occPath} {$args}";
     $process = new Process($cmd);
     $process->run();
     if (!$process->isSuccessful()) {
         throw new ProcessFailedException($process);
     }
     return $process->getOutput();
 }
Exemplo n.º 2
0
 protected function runAsProcess($cmdLine)
 {
     $occPath = $this->locator->getPathToOccFile();
     $cmd = "php {$occPath} --no-warnings {$cmdLine}";
     $process = new Process($cmd);
     $process->setTimeout(null);
     $process->run();
     if (!$process->isSuccessful()) {
         throw new ProcessFailedException($process);
     }
     return $process->getOutput();
 }