src/Http/Header.php
public function replace(array $headers = []): void
    {
        $this->headerNames = [];
        $this->headers = [];

        $headers !== [] && $this->add($headers);

        if (!isset($this->headers['Cache-Control'])) {
            $this->set('Cache-Control', '');
        }
    }
public function replace(array $headers = []): void
    {
        $this->headerNames = [];
        $this->headers = [];

        $headers !== [] && $this->add($headers);

        if (!isset($this->headers['Cache-Control'])) {
            $this->set('Cache-Control', '');
        }
    }
public function replace ( array $ headers = [ ] ) : void { $ this -> headerNames = [ ] ; $ this -> headers = [ ] ; $ headers !== [ ] && $ this -> add ( $ headers ) ; if ( ! isset ( $ this -> headers [ 'Cache-Control' ] ) ) { $ this -> set ( 'Cache-Control' , '' ) ; } }
Replaces the current HTTP headers by a new set.

@param array $headers An array of HTTP headers

@throws \LogicException
Replaces the current HTTP headers by a new set .