You are here

public function HeaderBag::add in Zircon Profile 8

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

Adds new headers the current HTTP headers set.

Parameters

array $headers An array of HTTP headers:

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 96

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

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