@@ -17,10 +17,16 @@ discard block |
||
| 17 | 17 | // protected static $valid_keys = array(); |
| 18 | 18 | // protected static $default_value; |
| 19 | 19 | |
| 20 | + /** |
|
| 21 | + * @param string $message |
|
| 22 | + */ |
|
| 20 | 23 | protected static function error($message) { |
| 21 | 24 | return \projectcleverweb\color\error::call($message); |
| 22 | 25 | } |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return double |
|
| 29 | + */ |
|
| 24 | 30 | protected static function _validate_array_input($input) { |
| 25 | 31 | if (!is_array($input)) { |
| 26 | 32 | static::error(sprintf( |
@@ -46,6 +52,9 @@ discard block |
||
| 46 | 52 | return $array; |
| 47 | 53 | } |
| 48 | 54 | |
| 55 | + /** |
|
| 56 | + * @return string |
|
| 57 | + */ |
|
| 49 | 58 | public static function _validate_hex_input($input) { |
| 50 | 59 | if (is_int($input)) { |
| 51 | 60 | return str_pad(dechex($input % 16777216), 6, '0', STR_PAD_LEFT); |