refactor all base things

This commit is contained in:
crazywhalecc
2022-08-13 17:00:29 +08:00
committed by Jerry Ma
parent 1c801bb205
commit b2c95d96b1
54 changed files with 3009 additions and 383 deletions

View File

@@ -2,11 +2,14 @@
declare(strict_types=1);
/** 定义炸毛框架初始启动时间 */
use ZM\Utils\ZMUtil;
/* 定义炸毛框架初始启动时间 */
if (!defined('ZM_START_TIME')) {
define('ZM_START_TIME', microtime(true));
}
/* 定义使用炸毛框架应用的版本 */
if (!defined('APP_VERSION')) {
define('APP_VERSION', LOAD_MODE == 1 ? (json_decode(file_get_contents(SOURCE_ROOT_DIR . '/composer.json'), true)['version'] ?? 'unknown') : 'unknown');
define('APP_VERSION', LOAD_MODE == 1 ? (ZMUtil::getComposerMetadata()['version'] ?? ZM_VERSION) : ZM_VERSION);
}