ResponseHeader
in package
uses
HeaderTrait
Class ResponseHeader.
Tags
Table of Contents
Constants
- ACCEPT_RANGES : string = 'Accept-Ranges'
- ACCESS_CONTROL_ALLOW_CREDENTIALS : string = 'Access-Control-Allow-Credentials'
- ACCESS_CONTROL_ALLOW_HEADERS : string = 'Access-Control-Allow-Headers'
- ACCESS_CONTROL_ALLOW_METHODS : string = 'Access-Control-Allow-Methods'
- ACCESS_CONTROL_ALLOW_ORIGIN : string = 'Access-Control-Allow-Origin'
- ACCESS_CONTROL_EXPOSE_HEADERS : string = 'Access-Control-Expose-Headers'
- ACCESS_CONTROL_MAX_AGE : string = 'Access-Control-Max-Age'
- AGE : string = 'Age'
- ALLOW : string = 'Allow'
- CACHE_CONTROL : string = 'Cache-Control'
- CLEAR_SITE_DATA : string = 'Clear-Site-Data'
- CONNECTION : string = 'Connection'
- CONTENT_DISPOSITION : string = 'Content-Disposition'
- CONTENT_ENCODING : string = 'Content-Encoding'
- CONTENT_LANGUAGE : string = 'Content-Language'
- CONTENT_LENGTH : string = 'Content-Length'
- CONTENT_LOCATION : string = 'Content-Location'
- CONTENT_RANGE : string = 'Content-Range'
- CONTENT_SECURITY_POLICY : string = 'Content-Security-Policy'
- CONTENT_SECURITY_POLICY_REPORT_ONLY : string = 'Content-Security-Policy-Report-Only'
- CONTENT_TYPE : string = 'Content-Type'
- DATE : string = 'Date'
- ETAG : string = 'ETag'
- EXPECT_CT : string = 'Expect-CT'
- EXPIRES : string = 'Expires'
- FEATURE_POLICY : string = 'Feature-Policy'
- KEEP_ALIVE : string = 'Keep-Alive'
- LAST_MODIFIED : string = 'Last-Modified'
- LINK : string = 'Link'
- LOCATION : string = 'Location'
- PRAGMA : string = 'Pragma'
- PROXY_AUTHENTICATE : string = 'Proxy-Authenticate'
- PUBLIC_KEY_PINS : string = 'Public-Key-Pins'
- PUBLIC_KEY_PINS_REPORT_ONLY : string = 'Public-Key-Pins-Report-Only'
- REFERRER_POLICY : string = 'Referrer-Policy'
- RETRY_AFTER : string = 'Retry-After'
- SERVER : string = 'Server'
- SET_COOKIE : string = 'Set-Cookie'
- SOURCEMAP : string = 'SourceMap'
- STRICT_TRANSPORT_SECURITY : string = 'Strict-Transport-Security'
- TIMING_ALLOW_ORIGIN : string = 'Timing-Allow-Origin'
- TK : string = 'Tk'
- TRAILER : string = 'Trailer'
- TRANSFER_ENCODING : string = 'Transfer-Encoding'
- UPGRADE : string = 'Upgrade'
- VARY : string = 'Vary'
- VIA : string = 'Via'
- WARNING : string = 'Warning'
- WWW_AUTHENTICATE : string = 'WWW-Authenticate'
- X_CONTENT_TYPE_OPTIONS : string = 'X-Content-Type-Options'
- X_DNS_PREFETCH_CONTROL : string = 'X-DNS-Prefetch-Control'
- X_FRAME_OPTIONS : string = 'X-Frame-Options'
- X_POWERED_BY : string = 'X-Powered-By'
- X_REQUEST_ID : string = 'X-Request-ID'
- X_ROBOTS_TAG : string = 'X-Robots-Tag'
- X_XSS_PROTECTION : string = 'X-XSS-Protection'
Properties
- $headers : array<string, string>
- Header names.
Methods
- getMultilines() : array<string|int, string>
- getName() : string
- isMultiline() : bool
- setName() : void
Constants
ACCEPT_RANGES
public
string
ACCEPT_RANGES
= 'Accept-Ranges'
Tags
ACCESS_CONTROL_ALLOW_CREDENTIALS
public
string
ACCESS_CONTROL_ALLOW_CREDENTIALS
= 'Access-Control-Allow-Credentials'
Tags
ACCESS_CONTROL_ALLOW_HEADERS
public
string
ACCESS_CONTROL_ALLOW_HEADERS
= 'Access-Control-Allow-Headers'
Tags
ACCESS_CONTROL_ALLOW_METHODS
public
string
ACCESS_CONTROL_ALLOW_METHODS
= 'Access-Control-Allow-Methods'
Tags
ACCESS_CONTROL_ALLOW_ORIGIN
public
string
ACCESS_CONTROL_ALLOW_ORIGIN
= 'Access-Control-Allow-Origin'
Tags
ACCESS_CONTROL_EXPOSE_HEADERS
public
string
ACCESS_CONTROL_EXPOSE_HEADERS
= 'Access-Control-Expose-Headers'
Tags
ACCESS_CONTROL_MAX_AGE
public
string
ACCESS_CONTROL_MAX_AGE
= 'Access-Control-Max-Age'
Tags
AGE
public
string
AGE
= 'Age'
Tags
ALLOW
public
string
ALLOW
= 'Allow'
Tags
CACHE_CONTROL
public
string
CACHE_CONTROL
= 'Cache-Control'
Tags
CLEAR_SITE_DATA
public
string
CLEAR_SITE_DATA
= 'Clear-Site-Data'
Tags
CONNECTION
public
string
CONNECTION
= 'Connection'
Tags
CONTENT_DISPOSITION
public
string
CONTENT_DISPOSITION
= 'Content-Disposition'
Tags
CONTENT_ENCODING
public
string
CONTENT_ENCODING
= 'Content-Encoding'
Tags
CONTENT_LANGUAGE
public
string
CONTENT_LANGUAGE
= 'Content-Language'
Tags
CONTENT_LENGTH
public
string
CONTENT_LENGTH
= 'Content-Length'
Tags
CONTENT_LOCATION
public
string
CONTENT_LOCATION
= 'Content-Location'
Tags
CONTENT_RANGE
public
string
CONTENT_RANGE
= 'Content-Range'
Tags
CONTENT_SECURITY_POLICY
public
string
CONTENT_SECURITY_POLICY
= 'Content-Security-Policy'
Tags
CONTENT_SECURITY_POLICY_REPORT_ONLY
public
string
CONTENT_SECURITY_POLICY_REPORT_ONLY
= 'Content-Security-Policy-Report-Only'
Tags
CONTENT_TYPE
public
string
CONTENT_TYPE
= 'Content-Type'
Tags
DATE
public
string
DATE
= 'Date'
Tags
ETAG
public
string
ETAG
= 'ETag'
Tags
EXPECT_CT
public
string
EXPECT_CT
= 'Expect-CT'
Tags
EXPIRES
public
string
EXPIRES
= 'Expires'
Tags
FEATURE_POLICY
public
string
FEATURE_POLICY
= 'Feature-Policy'
Tags
KEEP_ALIVE
public
string
KEEP_ALIVE
= 'Keep-Alive'
Tags
LAST_MODIFIED
public
string
LAST_MODIFIED
= 'Last-Modified'
Tags
LINK
public
string
LINK
= 'Link'
Tags
LOCATION
public
string
LOCATION
= 'Location'
Tags
PRAGMA
public
string
PRAGMA
= 'Pragma'
Tags
PROXY_AUTHENTICATE
public
string
PROXY_AUTHENTICATE
= 'Proxy-Authenticate'
Tags
PUBLIC_KEY_PINS
public
string
PUBLIC_KEY_PINS
= 'Public-Key-Pins'
Tags
PUBLIC_KEY_PINS_REPORT_ONLY
public
string
PUBLIC_KEY_PINS_REPORT_ONLY
= 'Public-Key-Pins-Report-Only'
Tags
REFERRER_POLICY
public
string
REFERRER_POLICY
= 'Referrer-Policy'
Tags
RETRY_AFTER
public
string
RETRY_AFTER
= 'Retry-After'
Tags
SERVER
public
string
SERVER
= 'Server'
Tags
SET_COOKIE
public
string
SET_COOKIE
= 'Set-Cookie'
Tags
SOURCEMAP
public
string
SOURCEMAP
= 'SourceMap'
Tags
STRICT_TRANSPORT_SECURITY
public
string
STRICT_TRANSPORT_SECURITY
= 'Strict-Transport-Security'
Tags
TIMING_ALLOW_ORIGIN
public
string
TIMING_ALLOW_ORIGIN
= 'Timing-Allow-Origin'
Tags
TK
public
string
TK
= 'Tk'
Tags
TRAILER
public
string
TRAILER
= 'Trailer'
Tags
TRANSFER_ENCODING
public
string
TRANSFER_ENCODING
= 'Transfer-Encoding'
Tags
UPGRADE
public
string
UPGRADE
= 'Upgrade'
Tags
VARY
public
string
VARY
= 'Vary'
Tags
VIA
public
string
VIA
= 'Via'
Tags
WARNING
public
string
WARNING
= 'Warning'
Tags
WWW_AUTHENTICATE
public
string
WWW_AUTHENTICATE
= 'WWW-Authenticate'
Tags
X_CONTENT_TYPE_OPTIONS
public
string
X_CONTENT_TYPE_OPTIONS
= 'X-Content-Type-Options'
Tags
X_DNS_PREFETCH_CONTROL
public
string
X_DNS_PREFETCH_CONTROL
= 'X-DNS-Prefetch-Control'
Tags
X_FRAME_OPTIONS
public
string
X_FRAME_OPTIONS
= 'X-Frame-Options'
Tags
X_POWERED_BY
public
string
X_POWERED_BY
= 'X-Powered-By'
Tags
X_REQUEST_ID
public
string
X_REQUEST_ID
= 'X-Request-ID'
Tags
X_ROBOTS_TAG
public
string
X_ROBOTS_TAG
= 'X-Robots-Tag'
Tags
X_XSS_PROTECTION
public
string
X_XSS_PROTECTION
= 'X-XSS-Protection'
Tags
Properties
$headers
Header names.
protected
static array<string, string>
$headers
= [
// ---------------------------------------------------------------------
// General headers (Request and Response)
// ---------------------------------------------------------------------
'cache-control' => 'Cache-Control',
'connection' => 'Connection',
'content-disposition' => 'Content-Disposition',
'date' => 'Date',
'keep-alive' => 'Keep-Alive',
'link' => 'Link',
'pragma' => 'Pragma',
'via' => 'Via',
'warning' => 'Warning',
// ---------------------------------------------------------------------
// Representation headers (Request and Response)
// ---------------------------------------------------------------------
'content-encoding' => 'Content-Encoding',
'content-language' => 'Content-Language',
'content-location' => 'Content-Location',
'content-type' => 'Content-Type',
// ---------------------------------------------------------------------
// Payload headers (Request and Response)
// ---------------------------------------------------------------------
'content-length' => 'Content-Length',
'content-range' => 'Content-Range',
'trailer' => 'Trailer',
'transfer-encoding' => 'Transfer-Encoding',
// ---------------------------------------------------------------------
// Request headers
// ---------------------------------------------------------------------
'accept' => 'Accept',
'accept-charset' => 'Accept-Charset',
'accept-encoding' => 'Accept-Encoding',
'accept-language' => 'Accept-Language',
'access-control-request-headers' => 'Access-Control-Request-Headers',
'access-control-request-method' => 'Access-Control-Request-Method',
'authorization' => 'Authorization',
'cdn-loop' => 'CDN-Loop',
'cookie' => 'Cookie',
'dnt' => 'DNT',
'expect' => 'Expect',
'forwarded' => 'Forwarded',
'from' => 'From',
'host' => 'Host',
'if-match' => 'If-Match',
'if-modified-since' => 'If-Modified-Since',
'if-none-match' => 'If-None-Match',
'if-range' => 'If-Range',
'if-unmodified-since' => 'If-Unmodified-Since',
'origin' => 'Origin',
'priority' => 'Priority',
'proxy-authorization' => 'Proxy-Authorization',
'range' => 'Range',
'referer' => 'Referer',
'sec-fetch-dest' => 'Sec-Fetch-Dest',
'sec-fetch-mode' => 'Sec-Fetch-Mode',
'sec-fetch-site' => 'Sec-Fetch-Site',
'sec-fetch-user' => 'Sec-Fetch-User',
'te' => 'TE',
'upgrade-insecure-requests' => 'Upgrade-Insecure-Requests',
'user-agent' => 'User-Agent',
'x-forwarded-for' => 'X-Forwarded-For',
'x-forwarded-host' => 'X-Forwarded-Host',
'x-forwarded-proto' => 'X-Forwarded-Proto',
'x-real-ip' => 'X-Real-IP',
'x-requested-with' => 'X-Requested-With',
// ---------------------------------------------------------------------
// Response headers
// ---------------------------------------------------------------------
'accept-ranges' => 'Accept-Ranges',
'access-control-allow-credentials' => 'Access-Control-Allow-Credentials',
'access-control-allow-headers' => 'Access-Control-Allow-Headers',
'access-control-allow-methods' => 'Access-Control-Allow-Methods',
'access-control-allow-origin' => 'Access-Control-Allow-Origin',
'access-control-expose-headers' => 'Access-Control-Expose-Headers',
'access-control-max-age' => 'Access-Control-Max-Age',
'age' => 'Age',
'allow' => 'Allow',
'clear-site-data' => 'Clear-Site-Data',
'content-security-policy' => 'Content-Security-Policy',
'content-security-policy-report-only' => 'Content-Security-Policy-Report-Only',
'etag' => 'ETag',
'expect-ct' => 'Expect-CT',
'expires' => 'Expires',
'feature-policy' => 'Feature-Policy',
'last-modified' => 'Last-Modified',
'location' => 'Location',
'proxy-authenticate' => 'Proxy-Authenticate',
'public-key-pins' => 'Public-Key-Pins',
'public-key-pins-report-only' => 'Public-Key-Pins-Report-Only',
'referrer-policy' => 'Referrer-Policy',
'retry-after' => 'Retry-After',
'server' => 'Server',
'set-cookie' => 'Set-Cookie',
'sourcemap' => 'SourceMap',
'strict-transport-security' => 'Strict-Transport-Security',
'timing-allow-origin' => 'Timing-Allow-Origin',
'tk' => 'Tk',
'vary' => 'Vary',
'www-authenticate' => 'WWW-Authenticate',
'x-content-type-options' => 'X-Content-Type-Options',
'x-dns-prefetch-control' => 'X-DNS-Prefetch-Control',
'x-frame-options' => 'X-Frame-Options',
'x-robots-tag' => 'X-Robots-Tag',
'x-xss-protection' => 'X-XSS-Protection',
// ---------------------------------------------------------------------
// Custom (Response)
// ---------------------------------------------------------------------
'x-request-id' => 'X-Request-ID',
'x-powered-by' => 'X-Powered-By',
// ---------------------------------------------------------------------
// WebSocket
// ---------------------------------------------------------------------
'sec-websocket-extensions' => 'Sec-WebSocket-Extensions',
'sec-websocket-key' => 'Sec-WebSocket-Key',
'sec-websocket-protocol' => 'Sec-WebSocket-Protocol',
'sec-websocket-version' => 'Sec-WebSocket-Version',
]
Tags
Methods
getMultilines()
public
static getMultilines() : array<string|int, string>
Return values
array<string|int, string>getName()
public
static getName(string $name) : string
Parameters
- $name : string
Return values
stringisMultiline()
public
static isMultiline(string $name) : bool
Parameters
- $name : string
Return values
boolsetName()
public
static setName(string $name) : void
Parameters
- $name : string