public function getHeader($name, $default = null, $first = true)
    {
        if (!isset($this->headers[$name])) {
            return $default;
        }

        if (is_array($this->headers[$name]) && $first) {
            return current($this->headers[$name]);
        }

        return $this->headers[$name];
    }
public function getHeader($name, $default = null, $first = true)
    {
        if (!isset($this->headers[$name])) {
            return $default;
        }

        if (is_array($this->headers[$name]) && $first) {
            return current($this->headers[$name]);
        }

        return $this->headers[$name];
    }
public function getHeader ( $ name , $ default = null , $ first = true ) { if ( ! isset ( $ this -> headers [ $ name ] ) ) { return $ default ; } if ( is_array ( $ this -> headers [ $ name ] ) && $ first ) { return current ( $ this -> headers [ $ name ] ) ; } return $ this -> headers [ $ name ] ; }
Get the header string

@param  string $name The header name
@param  mixed $default The default value
@param  bool $first Return the first element or the whole header values
@return mixed
Get the header string