private function Store::restoreResponse in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/HttpCache/Store.php \Symfony\Component\HttpKernel\HttpCache\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
2 calls to Store::restoreResponse()
- Store::invalidate in vendor/
symfony/ http-kernel/ HttpCache/ Store.php - Invalidates all cache entries that match the request.
- Store::lookup in vendor/
symfony/ http-kernel/ HttpCache/ Store.php - Locates a cached Response for the Request provided.
File
- vendor/
symfony/ http-kernel/ HttpCache/ Store.php, line 438
Class
- Store
- Store implements all the logic for storing cache metadata (Request and Response headers).
Namespace
Symfony\Component\HttpKernel\HttpCacheCode
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);
}