src/Room11/HTTP/Response/Response.php
public function addHeader($field, $value)
    {
        if ($this->hasHeader($field)) {
            $existing = $this->getHeader($field);
            $existing = is_array($existing) ? $existing : [$existing];
            $value = is_scalar($value) ? [$value] : $value;
            $newHeaders = array_merge($existing, $value);
            $this->setHeader($field, $newHeaders);
        } else {
            $this->setHeader($field, $value);
        }

        return $this;
    }
public function addHeader($field, $value)
    {
        if ($this->hasHeader($field)) {
            $existing = $this->getHeader($field);
            $existing = is_array($existing) ? $existing : [$existing];
            $value = is_scalar($value) ? [$value] : $value;
            $newHeaders = array_merge($existing, $value);
            $this->setHeader($field, $newHeaders);
        } else {
            $this->setHeader($field, $value);
        }

        return $this;
    }
public function addHeader ( $ field , $ value ) { if ( $ this -> hasHeader ( $ field ) ) { $ existing = $ this -> getHeader ( $ field ) ; $ existing = is_array ( $ existing ) ? $ existing : [ $ existing ] ; $ value = is_scalar ( $ value ) ? [ $ value ] : $ value ; $ newHeaders = array_merge ( $ existing , $ value ) ; $ this -> setHeader ( $ field , $ newHeaders ) ; } else { $ this -> setHeader ( $ field , $ value ) ; } return $ this ; }
Append a header value

The header value is appended to existing fields with the same name.
Header field names are NOT case-sensitive.

@param string $field
@param string $value
@throws \InvalidArgumentException
@return Response Returns the current object instance
Append a header value