|
@@ 105-107 (lines=3) @@
|
| 102 |
|
|
| 103 |
|
public static function ip4($ipAddress) |
| 104 |
|
{ |
| 105 |
|
if (false === filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { |
| 106 |
|
throw new HttpException('invalid IPv4 address', 400); |
| 107 |
|
} |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public static function ip6($ipAddress) |
|
@@ 112-114 (lines=3) @@
|
| 109 |
|
|
| 110 |
|
public static function ip6($ipAddress) |
| 111 |
|
{ |
| 112 |
|
if (false === filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { |
| 113 |
|
throw new HttpException('invalid IPv6 address', 400); |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
public static function connectedAt($connectedAt) |