You are here

public function HeaderBag::__construct in Zircon Profile 8

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

Constructor.

Parameters

array $headers An array of HTTP headers:

1 call to HeaderBag::__construct()
ResponseHeaderBag::__construct in vendor/symfony/http-foundation/ResponseHeaderBag.php
Constructor.
1 method overrides HeaderBag::__construct()
ResponseHeaderBag::__construct in vendor/symfony/http-foundation/ResponseHeaderBag.php
Constructor.

File

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

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

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