Replaces the current HTTP headers by a new set.
@api
Parameters
array $headers An array of HTTP headers:
File
- drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php, line 97
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);
}