Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (RequestInterface $httpRequest, array $alternativeHeaders=[], array $trustedProxies=null) | |
getRemoteAddress (bool $ipToLong=false) | |
getRemoteHost () | |
Protected Attributes | |
$request | |
$remoteAddress | |
$alternativeHeaders | |
Library for working with client ip address.
Definition at line 13 of file RemoteAddress.php.
__construct | ( | RequestInterface | $httpRequest, |
array | $alternativeHeaders = [] , |
||
array | $trustedProxies = null |
||
) |
RequestInterface | $httpRequest | |
array | $alternativeHeaders | |
string[]|null | $trustedProxies |
Definition at line 44 of file RemoteAddress.php.
getRemoteAddress | ( | bool | $ipToLong = false | ) |
Retrieve Client Remote Address. If alternative headers are used and said headers allow multiple IPs it is suggested that trusted proxies is also used for more accurate IP recognition.
bool | $ipToLong | converting IP to long format |
Definition at line 120 of file RemoteAddress.php.
getRemoteHost | ( | ) |
Returns internet host name corresponding to remote server
Definition at line 150 of file RemoteAddress.php.
|
protected |
Definition at line 32 of file RemoteAddress.php.
|
protected |
Definition at line 27 of file RemoteAddress.php.
|
protected |
Definition at line 20 of file RemoteAddress.php.