You are here

public function HeaderBag::replace in Zircon Profile 8.0

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

Replaces the current HTTP headers by a new set.

Parameters

array $headers An array of HTTP headers:

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

File

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

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function replace(array $headers = array()) {
  $this->headers = array();
  $this
    ->add($headers);
}