Symfony\Component\BrowserKit\Client::doRequestInProcess PHP Method

doRequestInProcess() protected method

Makes a request in another process.
protected doRequestInProcess ( Symfony\Component\BrowserKit\Request $request ) : Symfony\Component\BrowserKit\Response
$request Symfony\Component\BrowserKit\Request A Request instance
return Symfony\Component\BrowserKit\Response A Response instance
    protected function doRequestInProcess($request)
    {
        // We set the TMPDIR (for Macs) and TEMP (for Windows), because on these platforms the temp directory changes based on the user.
        $process = new PhpProcess($this->getScript($request), null, array('TMPDIR' => sys_get_temp_dir(), 'TEMP' => sys_get_temp_dir()));
        $process->run();

        if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {
            throw new \RuntimeException('OUTPUT: '.$process->getOutput().' ERROR OUTPUT: '.$process->getErrorOutput());
        }

        return unserialize($process->getOutput());
    }

Same methods

Client::doRequestInProcess ( Symfony\Component\BrowserKit\Request $request ) : Symfony\Component\BrowserKit\Response