1 | <?php |
||
11 | class BooleanValidator extends AbstractFormatValidator |
||
12 | { |
||
13 | /** |
||
14 | * Validate that the input is a valid boolean. |
||
15 | * This accepts: |
||
16 | * 1 and 0 |
||
17 | * "1" and "0" |
||
18 | * "on" or "ON" and "off" or "OFF" |
||
19 | * "yes" or "YES" and "no" or "NO" |
||
20 | * true and false |
||
21 | * |
||
22 | * @access protected |
||
23 | * |
||
24 | * @return boolean Whether the input is valid. |
||
25 | */ |
||
26 | 1 | protected function formatDefault() |
|
32 | } |
||
33 |