Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HeaderBag.php

function HeaderBag::remove

Removes a header.

2 calls to HeaderBag::remove()
ResponseHeaderBag::remove in vendor/symfony/http-foundation/ResponseHeaderBag.php
Removes a header.
ResponseHeaderBag::remove in vendor/symfony/http-foundation/ResponseHeaderBag.php
Removes a header.
1 method overrides HeaderBag::remove()
ResponseHeaderBag::remove in vendor/symfony/http-foundation/ResponseHeaderBag.php
Removes a header.

File

vendor/symfony/http-foundation/HeaderBag.php, line 174

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function remove(string $key) : void {
    $key = strtr($key, self::UPPER, self::LOWER);
    unset($this->headers[$key]);
    if ('cache-control' === $key) {
        $this->cacheControl = [];
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal