public function setHeaders(array $headers, $append = false)
    {
        if (!$append) {
            $this->headers = $headers;
        } else {
            foreach ($headers as $field => $value) {
                $this->setHeader($field, $value);
            }
        }
    }
public function setHeaders(array $headers, $append = false)
    {
        if (!$append) {
            $this->headers = $headers;
        } else {
            foreach ($headers as $field => $value) {
                $this->setHeader($field, $value);
            }
        }
    }
public function setHeaders ( array $ headers , $ append = false ) { if ( ! $ append ) { $ this -> headers = $ headers ; } else { foreach ( $ headers as $ field => $ value ) { $ this -> setHeader ( $ field , $ value ) ; } } }
Set or reset the headers

@param array $headers Array of headers
@param bool $reset    (Optional) Reset the existing headers

@return void
Set or reset the headers