private function Store::restoreResponse

Restores a Response from the HTTP headers and body.

Parameters

array $headers An array of HTTP headers for the Response:

string $body The Response body:

Return value

Response

2 calls to Store::restoreResponse()
Store::invalidate in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
Invalidates all cache entries that match the request.
Store::lookup in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
Locates a cached Response for the Request provided.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php, line 418

Class

Store
Store implements all the logic for storing cache metadata (Request and Response headers).

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

private function restoreResponse($headers, $body = null) {
  $status = $headers['X-Status'][0];
  unset($headers['X-Status']);
  if (null !== $body) {
    $headers['X-Body-File'] = array(
      $body,
    );
  }
  return new Response($body, $status, $headers);
}