install_db

This commit is contained in:
2024-05-17 17:32:39 +00:00
parent 43ee0015ea
commit ec9e7be5d8
+14
View File
@@ -87,6 +87,20 @@ if($result !== true){
}
if (!class_exists('\\sammo\\DB')) {
$loader = require __DIR__.'/../vendor/autoload.php';
$loader->addClassMap((function () {
$d_settingMap = [];
foreach (glob(__DIR__.'/d_setting/*.orig.php') as $filepath) {
$filepath = str_replace('.orig.php', '.php', $filepath);
if(!file_exists($filepath)) {
continue;
}
$filename = basename($filepath);
$classname = explode('.', $filename)[0];
$d_settingMap['sammo\\'.$classname] = $filepath;
};
return $d_settingMap;
})());
opcache_reset();
}