◆ anonymize()
static Symfony\Component\HttpFoundation\IpUtils::anonymize |
( |
string |
$ip | ) |
|
|
static |
◆ checkIp() [1/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp |
( |
|
$requestIp, |
|
|
|
$ips |
|
) |
| |
|
static |
Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets.
- Parameters
-
string | $requestIp | IP to check |
string | array | $ips | List of IPs or subnets (can be a string if only a single one) |
- Returns
- bool Whether the IP is valid
Definition at line 38 of file vendor/symfony/http-foundation/IpUtils.php.
◆ checkIp() [2/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp |
( |
|
$requestIp, |
|
|
|
$ips |
|
) |
| |
|
static |
◆ checkIp4() [1/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp4 |
( |
|
$requestIp, |
|
|
|
$ip |
|
) |
| |
|
static |
Compares two IPv4 addresses. In case a subnet is given, it checks if it contains the request IP.
- Parameters
-
string | $requestIp | IPv4 address to check |
string | $ip | IPv4 address or subnet in CIDR notation |
- Returns
- bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet
Definition at line 64 of file vendor/symfony/http-foundation/IpUtils.php.
◆ checkIp4() [2/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp4 |
( |
|
$requestIp, |
|
|
|
$ip |
|
) |
| |
|
static |
Compares two IPv4 addresses. In case a subnet is given, it checks if it contains the request IP.
- Parameters
-
string | $requestIp | IPv4 address to check |
string | $ip | IPv4 address or subnet in CIDR notation |
- Returns
- bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet
Definition at line 64 of file lib/vendor/symfony/http-foundation/IpUtils.php.
◆ checkIp6() [1/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp6 |
( |
|
$requestIp, |
|
|
|
$ip |
|
) |
| |
|
static |
Compares two IPv6 addresses. In case a subnet is given, it checks if it contains the request IP.
- Author
- David Soria Parra <dsp at php dot net>
- See also
- https://github.com/dsp/v6tools
- Parameters
-
string | $requestIp | IPv6 address to check |
string | $ip | IPv6 address or subnet in CIDR notation |
- Returns
- bool Whether the IP is valid
- Exceptions
-
Definition at line 108 of file lib/vendor/symfony/http-foundation/IpUtils.php.
◆ checkIp6() [2/2]
static Symfony\Component\HttpFoundation\IpUtils::checkIp6 |
( |
|
$requestIp, |
|
|
|
$ip |
|
) |
| |
|
static |
Compares two IPv6 addresses. In case a subnet is given, it checks if it contains the request IP.
- Author
- David Soria Parra <dsp at php dot net>
- See also
- https://github.com/dsp/v6tools
- Parameters
-
string | $requestIp | IPv6 address to check |
string | $ip | IPv6 address or subnet in CIDR notation |
- Returns
- bool Whether the IP is valid
- Exceptions
-
Definition at line 112 of file vendor/symfony/http-foundation/IpUtils.php.
The documentation for this class was generated from the following file: