public function header($name, $default = null, $sanitize = true)
    {
        $headers = $this->headers();

        $name = ucfirst(strtolower($name));

        if (array_key_exists($name, $headers)) {
            return $sanitize ? filter_var($headers[$name], FILTER_SANITIZE_STRING) : $headers[$name];
        }

        return $default;
    }
public function header($name, $default = null, $sanitize = true)
    {
        $headers = $this->headers();

        $name = ucfirst(strtolower($name));

        if (array_key_exists($name, $headers)) {
            return $sanitize ? filter_var($headers[$name], FILTER_SANITIZE_STRING) : $headers[$name];
        }

        return $default;
    }
public function header ( $ name , $ default = null , $ sanitize = true ) { $ headers = $ this -> headers ( ) ; $ name = ucfirst ( strtolower ( $ name ) ) ; if ( array_key_exists ( $ name , $ headers ) ) { return $ sanitize ? filter_var ( $ headers [ $ name ] , FILTER_SANITIZE_STRING ) : $ headers [ $ name ] ; } return $ default ; }
Returns an HTTP header
@param string $name
@param mixed $default
@param bool $sanitize
@return string
Returns an HTTP header