You are here

protected function Client::filterRequest in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/http-kernel/Client.php \Symfony\Component\HttpKernel\Client::filterRequest()
  2. 8 vendor/symfony/browser-kit/Client.php \Symfony\Component\BrowserKit\Client::filterRequest()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Client.php \Symfony\Component\HttpKernel\Client::filterRequest()

Converts the BrowserKit request to a HttpKernel request.

Parameters

DomRequest $request A DomRequest instance:

Return value

Request A Request instance

Overrides Client::filterRequest

File

vendor/symfony/http-kernel/Client.php, line 143

Class

Client
Client simulates a browser and makes requests to a Kernel object.

Namespace

Symfony\Component\HttpKernel

Code

protected function filterRequest(DomRequest $request) {
  $httpRequest = Request::create($request
    ->getUri(), $request
    ->getMethod(), $request
    ->getParameters(), $request
    ->getCookies(), $request
    ->getFiles(), $request
    ->getServer(), $request
    ->getContent());
  foreach ($this
    ->filterFiles($httpRequest->files
    ->all()) as $key => $value) {
    $httpRequest->files
      ->set($key, $value);
  }
  return $httpRequest;
}