Fully Qualified Name: | Laminas\Session\Validator\RemoteAddr |
Implements: | ValidatorInterface |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor get the current user IP and store it in the session as 'valid data' | RemoteAddr |
getData() | Retrieve token for validating call | RemoteAddr |
getName() | Return validator name | RemoteAddr |
getUseProxy() | Checks proxy handling setting. | RemoteAddr |
isValid() | isValid() - this method will determine if the current user IP matches the IP we stored when we initialized this variable. | RemoteAddr |
setProxyHeader() | Set the header to introspect for proxy IPs | RemoteAddr |
setTrustedProxies() | Set list of trusted proxy addresses | RemoteAddr |
setUseProxy() | Changes proxy handling setting. | RemoteAddr |
Constructor get the current user IP and store it in the session as 'valid data'
Parameter Name | Type | Description |
---|---|---|
$data | null|string |
Returns:
Retrieve token for validating call
Returns: string
Return validator name
Returns: string
Checks proxy handling setting.
Returns: bool Current setting value.
isValid() - this method will determine if the current user IP matches the IP we stored when we initialized this variable.
Returns: bool
Set the header to introspect for proxy IPs
Parameter Name | Type | Description |
---|---|---|
$header | string |
Returns: void
Set list of trusted proxy addresses
Parameter Name | Type | Description |
---|---|---|
$trustedProxies | array |
Returns: void
Changes proxy handling setting.
This must be static method, since validators are recovered automatically at session read, so this is the only way to switch setting.
Parameter Name | Type | Description |
---|---|---|
$useProxy | bool | Whether |
Returns: void