You are here

public function ResponseHeaderBag::replace in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/ResponseHeaderBag.php \Symfony\Component\HttpFoundation\ResponseHeaderBag::replace()

Replaces the current HTTP headers by a new set.

Parameters

array $headers An array of HTTP headers:

Overrides HeaderBag::replace

File

vendor/symfony/http-foundation/ResponseHeaderBag.php, line 84

Class

ResponseHeaderBag
ResponseHeaderBag is a container for Response HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function replace(array $headers = array()) {
  $this->headerNames = array();
  parent::replace($headers);
  if (!isset($this->headers['cache-control'])) {
    $this
      ->set('Cache-Control', '');
  }
}