Final Class Yiisoft\ProxyMiddleware\IpValidator
| Inheritance | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| inRanges() | Yiisoft\ |
|
| isIp() | Yiisoft\ |
|
| isIpV6() | Yiisoft\ |
Method Details
| public static boolean inRanges ( string $value, string[] $ranges ) | ||
| $value | string | |
| $ranges | string[] | |
public static function inRanges(string $value, array $ranges): bool
{
return (new IpRanges($ranges))->isAllowed($value);
}
| public static boolean isIp ( string $value ) | ||
| $value | string | |
public static function isIp(string $value): bool
{
return self::isIpV4($value) || self::isIpV6($value);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.