Zend\Session\Validator\RemoteAddr
Synopsis
class RemoteAddr
implements
ValidatorInterface
{
- // members
- protected string $data;
- protected bool $useProxy;
- protected array $trustedProxies;
- protected string $proxyHeader;
- // methods
- public void __construct()
- public bool isValid()
- public static void setUseProxy()
- public static bool getUseProxy()
- public static void setTrustedProxies()
- public static void setProxyHeader()
- protected string getIpAddress()
- public string getData()
- public string getName()
Hierarchy
Implements
Members
protected
- $data
—
string
Internal data. - $proxyHeader
—
string
HTTP header to introspect for proxies - $trustedProxies
—
array
List of trusted proxy IP addresses - $useProxy
—
Zend\Session\Validator\bool
Whether to use proxy addresses or not.
Methods
protected
- getIpAddress() — Returns client IP address.
public
- __construct() — Constructor get the current user IP and store it in the session as 'valid data'
- getData() — Retrieve token for validating call
- getName() — Return validator name
- getUseProxy() — Checks proxy handling setting.
- isValid() — isValid() - this method will determine if the current user IP matches the IP we stored when we initialized this variable.
- setProxyHeader() — Set the header to introspect for proxy IPs
- setTrustedProxies() — Set list of trusted proxy addresses
- setUseProxy() — Changes proxy handling setting.