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

Breadcrumb

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

function HeaderBag::add

Adds new headers the current HTTP headers set.

1 call to HeaderBag::add()
HeaderBag::replace in vendor/symfony/http-foundation/HeaderBag.php
Replaces the current HTTP headers by a new set.

File

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

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function add(array $headers) : void {
    foreach ($headers as $key => $values) {
        $this->set($key, $values);
    }
}

API Navigation

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