You are here

protected function Client::doRequestInProcess in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Client.php \Symfony\Component\BrowserKit\Client::doRequestInProcess()

Makes a request in another process.

Parameters

object $request An origin request instance:

Return value

object An origin response instance

Throws

\RuntimeException When processing returns exit code

1 call to Client::doRequestInProcess()
Client::request in vendor/symfony/browser-kit/Client.php
Calls a URI.

File

vendor/symfony/browser-kit/Client.php, line 328

Class

Client
Client simulates a browser.

Namespace

Symfony\Component\BrowserKit

Code

protected function doRequestInProcess($request) {
  $process = new PhpProcess($this
    ->getScript($request), null, null);
  $process
    ->run();
  if (!$process
    ->isSuccessful() || !preg_match('/^O\\:\\d+\\:/', $process
    ->getOutput())) {
    throw new \RuntimeException(sprintf('OUTPUT: %s ERROR OUTPUT: %s', $process
      ->getOutput(), $process
      ->getErrorOutput()));
  }
  return unserialize($process
    ->getOutput());
}