RequestUtil
in package
Request Utils basic class.
Table of Contents
- $browserCache : stdClass
- $connectionCache : bool
- $httpsCache : bool
- $ipFields : array<string|int, string>
- IP fields names variable.
- $requestId : string
- getBrowserInfo() : object
- Get browser details.
- getIpByName() : string
- Get the IP address corresponding to a given Internet host name.
- getRemoteIP() : mixed
- isHttps() : bool
- Check that the connection is https.
- isNetConnection() : bool
- Check net connection.
- requestId() : string
- Get request id.
Properties
$browserCache
protected
static stdClass
$browserCache
Browser cache variable.
$connectionCache
protected
static bool
$connectionCache
Net connection cache.
$httpsCache
protected
static bool
$httpsCache
Cache https check variable.
$ipFields
IP fields names variable.
protected
static array<string|int, string>
$ipFields
= ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_CF_CONNECTING_IP']
$requestId
protected
static string
$requestId
Cache request id variable.
Methods
getBrowserInfo()
Get browser details.
public
static getBrowserInfo() : object
Return values
object —getIpByName()
Get the IP address corresponding to a given Internet host name.
public
static getIpByName(string $name) : string
Parameters
- $name : string
Return values
string —getRemoteIP()
public
static getRemoteIP([mixed $onlyIP = false ]) : mixed
Parameters
- $onlyIP : mixed = false
Return values
mixed —isHttps()
Check that the connection is https.
public
static isHttps() : bool
Return values
bool —isNetConnection()
Check net connection.
public
static isNetConnection() : bool
Return values
bool —requestId()
Get request id.
public
static requestId() : string