ClientIp
in package
Client Ip
Table of Contents
Properties
- $lookInHeaders : array<string|int, mixed>
- Lookup in headers
Methods
- getClientIpAddress() : string|null
- Return client Ip address.
- getFromHeader() : string|null
- Return header value
Properties
$lookInHeaders
Lookup in headers
protected
static array<string|int, mixed>
$lookInHeaders
= ['Forwarded', 'X-Forwarded-For', 'X-Forwarded', 'X-Cluster-Client-Ip', 'Client-Ip']
Methods
getClientIpAddress()
Return client Ip address.
public
static getClientIpAddress(object $request) : string|null
Parameters
- $request : object
Return values
string|nullgetFromHeader()
Return header value
public
static getFromHeader(object $request, string|null $header) : string|null
Parameters
- $request : object
- $header : string|null