1 | <?php |
||
18 | class Ip |
||
19 | { |
||
20 | /** |
||
21 | * |
||
22 | * Validates that the value is an IP address. |
||
23 | * |
||
24 | * @param object $subject The subject to be filtered. |
||
25 | * |
||
26 | * @param string $field The subject field name. |
||
27 | * |
||
28 | * @param mixed $flags `FILTER_VALIDATE_IP` flags to pass to filter_var(); |
||
29 | * cf. <http://php.net/manual/en/filter.filters.flags.php>. |
||
30 | * |
||
31 | * @return bool True if valid, false if not. |
||
32 | * |
||
33 | */ |
||
34 | 51 | public function __invoke($subject, $field, $flags = null) |
|
43 | } |
||
44 |