public function getResponseHeader($name = null, $first = true)
    {
        // Return response header string when parameter is not provided
        if (is_null($name)) {
            return $this->responseHeader;
        }

        $name = strtoupper($name);
        $headers = $this->getResponseHeaders();

        if (!isset($headers[$name])) {
            return $first ? null : array();
        } else {
            return $first ? current($headers[$name]) : $headers[$name];
        }
    }
public function getResponseHeader($name = null, $first = true)
    {
        // Return response header string when parameter is not provided
        if (is_null($name)) {
            return $this->responseHeader;
        }

        $name = strtoupper($name);
        $headers = $this->getResponseHeaders();

        if (!isset($headers[$name])) {
            return $first ? null : array();
        } else {
            return $first ? current($headers[$name]) : $headers[$name];
        }
    }
public function getResponseHeader ( $ name = null , $ first = true ) { // Return response header string when parameter is not provided if ( is_null ( $ name ) ) { return $ this -> responseHeader ; } $ name = strtoupper ( $ name ) ; $ headers = $ this -> getResponseHeaders ( ) ; if ( ! isset ( $ headers [ $ name ] ) ) { return $ first ? null : array ( ) ; } else { return $ first ? current ( $ headers [ $ name ] ) : $ headers [ $ name ] ; } }
Returns request header value

@param string $name The header name
@param bool $first Return the first element or the whole header values
@return string|array When $first is true, returns string, otherwise, returns array
Returns request header value