ArrayUtil.php
1 year ago
DefaultLogger.php
1 year ago
JsonSerializable.php
1 year ago
Logger.php
1 year ago
StringUtil.php
1 year ago
TimeUnit.php
1 year ago
TimeUtil.php
1 year ago
TimeValue.php
1 year ago
UrlUtil.php
1 year ago
JsonSerializable.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WonderPush\Util; |
| 4 | |
| 5 | if (count(get_included_files()) === 1) { http_response_code(403); exit(); } // Prevent direct access |
| 6 | |
| 7 | if (interface_exists('\JsonSerializable', false)) { |
| 8 | |
| 9 | interface JsonSerializable extends \JsonSerializable { |
| 10 | } |
| 11 | |
| 12 | } else { |
| 13 | |
| 14 | // For PHP < 5.4 |
| 15 | interface JsonSerializable { |
| 16 | public function jsonSerialize(); |
| 17 | } |
| 18 | |
| 19 | } |
| 20 |