This commit is contained in:
2020-09-15 20:17:14 +08:00
parent fe22af9d38
commit e6ebd6854a
3 changed files with 21 additions and 7 deletions
+16
View File
@@ -69,6 +69,22 @@ if (!function_exists('loadByDir')) {
}
if (!function_exists('instance_load')) {
function instance_load()
{
$content = json_decode(file_get_contents(__DIR__ . '/../composer.json'), true);
if (isset($content['autoload']) && isset($content['autoload']['psr-4'])) {
$psr4 = $content['autoload']['psr-4'];
foreach ($psr4 as $namespace => $dirname) {
classAutoload($namespace, __DIR__ . '/' . $dirname);
}
}
}
}
if (!function_exists('exif_imagetype')) {
/**