public function setHeadersFromArray(array $headers)
    {
        $status = array_shift($headers);
        $this->setStatus($status);

        foreach ($headers as $headerLine) {
            $headerLine = trim($headerLine);
            if ('' === $headerLine) {
                continue;
            }

            $this->addHeader($headerLine);
        }

        return $this;
    }
public function setHeadersFromArray(array $headers)
    {
        $status = array_shift($headers);
        $this->setStatus($status);

        foreach ($headers as $headerLine) {
            $headerLine = trim($headerLine);
            if ('' === $headerLine) {
                continue;
            }

            $this->addHeader($headerLine);
        }

        return $this;
    }
public function setHeadersFromArray ( array $ headers ) { $ status = array_shift ( $ headers ) ; $ this -> setStatus ( $ status ) ; foreach ( $ headers as $ headerLine ) { $ headerLine = trim ( $ headerLine ) ; if ( '' === $ headerLine ) { continue ; } $ this -> addHeader ( $ headerLine ) ; } return $ this ; }
Add headers represented by an array of header lines.

@param string[] $headers Response headers as array of header lines.

@return $this

@throws \UnexpectedValueException For invalid header values.
@throws \InvalidArgumentException For invalid status code arguments.
Add headers represented by an array of header lines .