\IpAccess
Check Access based on remote IP address.
Synopsis
class IpAccess
extends Object
{
- // members
- public array $allowedIps = ;
- private static array $allowed_ips = ;
- private string $ip = '';
- // methods
- public void __construct()
- public void setIp()
- public array getAllowedIps()
- public bool isEnabled()
- public bool hasAccess()
- public bool matchIp()
- public void respondNoAccess()
- public string matchExact()
- public string matchRange()
- public string matchCIDR()
- public string matchWildCard()
Hierarchy
Extends
- Object
Members
private
- $allowed_ips — array
- $ip — string
public
- $allowedIps — array
Methods
public
- __construct() — IpAccess constructor.
- getAllowedIps()
- hasAccess()
- isEnabled()
- matchCIDR() — Try to match cidr range Example : 192.168.1.0/24.
- matchExact()
- matchIp()
- matchRange() — Try to match against a ip range Example : 192.168.1.50-100.
- matchWildCard() — Try to match against a range that ends with a wildcard Example : 192.168.1.
- respondNoAccess()
- setIp()