1 | <?php |
||
19 | class JsonError |
||
|
|||
20 | { |
||
21 | /** |
||
22 | * User-land implementation of `json_last_error_msg()` for PHP < 5.5. |
||
23 | * |
||
24 | * @return string The last JSON error message. |
||
25 | */ |
||
26 | 5 | public static function getLastErrorMessage() |
|
30 | |||
31 | /** |
||
32 | * Returns the error message of a JSON error code. |
||
33 | * |
||
34 | * @param int $error The error code. |
||
35 | * |
||
36 | * @return string The error message. |
||
37 | */ |
||
38 | 5 | public static function getErrorMessage($error) |
|
68 | |||
69 | private function __construct() |
||
72 | } |
||
73 |