public static function reboot() { runtime::clear(); runtime::library(); runtime::config(); runtime::hook(); }
/** * 运行时执行,并加载相关文件 */ public static function build() { runtime::config(); runtime::library(); runtime::hooks(); //打包配置文件 zotop::data(ZOTOP_PATH_RUNTIME . DS . ZOTOP_APPLICATION_GROUP . '.config.php', zotop::config()); //打包全部hook文件 $hooks = runtime::compile(runtime::$hooks); if (!empty($hooks)) { file::write(ZOTOP_PATH_RUNTIME . DS . ZOTOP_APPLICATION_GROUP . '.hooks.php', $hooks, true); } //加载hooks以便核心文件使用 zotop::load(ZOTOP_PATH_RUNTIME . DS . ZOTOP_APPLICATION_GROUP . '.hooks.php'); //打包核心文件 $libraries = zotop::register(); $libraries = runtime::compile($libraries); if (!empty($libraries)) { file::write(ZOTOP_PATH_RUNTIME . DS . ZOTOP_APPLICATION_GROUP . '.core.php', $libraries, true); } }