mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
refactor all base things
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user