You are here

public function ResponseHeaderBag::remove in Zircon Profile 8

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

Removes a header.

Parameters

string $key The HTTP header name:

Overrides HeaderBag::remove

File

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

Class

ResponseHeaderBag
ResponseHeaderBag is a container for Response HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function remove($key) {
  parent::remove($key);
  $uniqueKey = strtr(strtolower($key), '_', '-');
  unset($this->headerNames[$uniqueKey]);
  if ('cache-control' === $uniqueKey) {
    $this->computedCacheControl = array();
  }
}