HostInterface
in
Table of Contents
- get_http_host() : string
- Retrieves the sanitized HTTP host if available, otherwise a default value.
- get_request_url() : null|string
- Constructs the full request URL based on the current protocol and app host.
- get_server_host() : array<string|int, mixed>
- Extracts the host domain and determines the protocol prefix.
- is_https_secure() : bool
- Determines if the current request is made over HTTPS.
Methods
get_http_host()
Retrieves the sanitized HTTP host if available, otherwise a default value.
public
get_http_host() : string
Return values
string —The sanitized host name or a default value.
get_request_url()
Constructs the full request URL based on the current protocol and app host.
public
get_request_url() : null|string
Return values
null|string —The full request URL or null if the app host is not available.
get_server_host()
Extracts the host domain and determines the protocol prefix.
public
get_server_host() : array<string|int, mixed>
Return values
array<string|int, mixed> —An associative array with 'prefix' (protocol) and 'domain' (host domain).
is_https_secure()
Determines if the current request is made over HTTPS.
public
is_https_secure() : bool
Return values
bool —True if the request is over HTTPS, false otherwise.