1 | <?php |
||
17 | class Invalid { |
||
18 | private static $value; |
||
19 | |||
20 | /** |
||
21 | * Private constructor to enforce singleton. |
||
22 | */ |
||
23 | private function __constructor() { |
||
26 | |||
27 | /** |
||
28 | * Return the invalid value. |
||
29 | * |
||
30 | * @return Invalid Returns the invalid value. |
||
31 | */ |
||
32 | 117 | public static function value() { |
|
38 | |||
39 | /** |
||
40 | * Tests a value to see if it is invalid. |
||
41 | * |
||
42 | * @param mixed $value The value to test. |
||
43 | * @return bool Returns **true** of the value is invalid or **false** otherwise. |
||
44 | */ |
||
45 | 115 | public static function isInvalid($value) { |
|
48 | |||
49 | /** |
||
50 | * Tests whether a value could be valid. |
||
51 | * |
||
52 | * Unlike {@link Invalid::inValid()} a value could still be invalid in some way even if this method returns true. |
||
53 | * |
||
54 | * @param mixed $value The value to test. |
||
55 | * @return bool Returns **true** of the value could be invalid or **false** otherwise. |
||
56 | */ |
||
57 | 117 | public static function isValid($value) { |
|
60 | } |
||
61 |