src/Room11/HTTP/Response/Response.php
public function getHeader($field)
    {
        $ucField = strtoupper($field);

        if ($ucField === 'SET-COOKIE' && $this->cookies) {
            $result = array_values($this->cookies);
        } elseif (isset($this->ucHeaders[$ucField])) {
            $field = $this->ucHeaders[$ucField];
            $result = $this->headers[$field];
        } else {
            throw new HTTPException(
                sprintf('Header field is not assigned: %s', $field)
            );
        }

        return isset($result[1]) ? $result : $result[0];
    }
public function getHeader($field)
    {
        $ucField = strtoupper($field);

        if ($ucField === 'SET-COOKIE' && $this->cookies) {
            $result = array_values($this->cookies);
        } elseif (isset($this->ucHeaders[$ucField])) {
            $field = $this->ucHeaders[$ucField];
            $result = $this->headers[$field];
        } else {
            throw new HTTPException(
                sprintf('Header field is not assigned: %s', $field)
            );
        }

        return isset($result[1]) ? $result : $result[0];
    }
public function getHeader ( $ field ) { $ ucField = strtoupper ( $ field ) ; if ( $ ucField === 'SET-COOKIE' && $ this -> cookies ) { $ result = array_values ( $ this -> cookies ) ; } elseif ( isset ( $ this -> ucHeaders [ $ ucField ] ) ) { $ field = $ this -> ucHeaders [ $ ucField ] ; $ result = $ this -> headers [ $ field ] ; } else { throw new HTTPException ( sprintf ( 'Header field is not assigned: %s' , $ field ) ) ; } return isset ( $ result [ 1 ] ) ? $ result : $ result [ 0 ] ; }
Retrieve assigned header values for the specified field

If only one value is assigned for the specified field, that scalar value is returned. If
multiple values are assigned for the field an array of scalars is returned.

@param string $field
@throws \DomainException
@return string|array
Retrieve assigned header values for the specified field