コード例 #1
0
ファイル: Client.php プロジェクト: skoop/symfony-sandbox
 /**
  * Makes a request in another process.
  *
  * @param Request $request A Request instance
  *
  * @return Response A Response instance
  *
  * @throws \RuntimeException When processing returns exit code
  */
 protected function doRequestInProcess($request)
 {
     $process = new PhpProcess($this->getScript($request));
     $process->run();
     if ($process->getExitCode() > 0) {
         throw new \RuntimeException($process->getErrorOutput());
     }
     return unserialize($process->getOutput());
 }