2013. Class

2013.1. Zend\Session\Validator\RemoteAddr

2013.1.1. Methods

2013.1.1.1. __construct

__construct()

Constructor get the current user IP and store it in the session as ‘valid data’

2013.1.1.2. isValid

isValid()

isValid() - this method will determine if the current user IP matches the IP we stored when we initialized this variable.

Return type:bool

2013.1.1.3. setUseProxy

setUseProxy()

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.

Parameters:bool – Whether to check also proxied IP addresses.
Return type:void

2013.1.1.4. getUseProxy

getUseProxy()

Checks proxy handling setting.

Return type:bool Current setting value.

2013.1.1.5. setTrustedProxies

setTrustedProxies()

Set list of trusted proxy addresses

Parameters:array
Return type:void

2013.1.1.6. setProxyHeader

setProxyHeader()

Set the header to introspect for proxy IPs

Parameters:string
Return type:void

2013.1.1.7. getIpAddress

getIpAddress()

Returns client IP address.

Return type:string IP address.

2013.1.1.8. getData

getData()

Retrieve token for validating call

Return type:string

2013.1.1.9. getName

getName()

Return validator name

Return type:string