1 | <?php |
||
9 | class CellTypeHelper |
||
10 | { |
||
11 | /** |
||
12 | * @param $value |
||
13 | * @return bool Whether the given value is considered "empty" |
||
14 | */ |
||
15 | 180 | public static function isEmpty($value) |
|
19 | |||
20 | /** |
||
21 | * @param $value |
||
22 | * @return bool Whether the given value is a non empty string |
||
23 | */ |
||
24 | 165 | public static function isNonEmptyString($value) |
|
28 | |||
29 | /** |
||
30 | * Returns whether the given value is numeric. |
||
31 | * A numeric value is from type "integer" or "double" ("float" is not returned by gettype). |
||
32 | * |
||
33 | * @param $value |
||
34 | * @return bool Whether the given value is numeric |
||
35 | */ |
||
36 | 173 | public static function isNumeric($value) |
|
42 | |||
43 | /** |
||
44 | * Returns whether the given value is boolean. |
||
45 | * "true"/"false" and 0/1 are not booleans. |
||
46 | * |
||
47 | * @param $value |
||
48 | * @return bool Whether the given value is boolean |
||
49 | */ |
||
50 | 183 | public static function isBoolean($value) |
|
54 | |||
55 | /** |
||
56 | * Returns whether the given value is a DateTime or DateInterval object. |
||
57 | * |
||
58 | * @param $value |
||
59 | * @return bool Whether the given value is a DateTime or DateInterval object |
||
60 | */ |
||
61 | 85 | public static function isDateTimeOrDateInterval($value) |
|
68 | } |
||
69 |