src/classes/Slion/Run.php
private function registerAutoload() {
        spl_autoload_register(function ($classname) {
            try {
                foreach (self::$_imported as $dir => $flag) {
                    $file = $dir . DIRECTORY_SEPARATOR .
                        \str_replace("\\", DIRECTORY_SEPARATOR, $classname) . ".php";
                    if (file_exists($file)) {
                        include $file;
                    }
                }
            } catch (\Throwable $exc) {
                error_log($exc->getMessage());
                error_log($exc->getCode());
                error_log($exc->getTraceAsString());
                return false;
            }
            if (class_exists($classname) || interface_exists($classname) ||
                trait_exists($classname)) {
                return true;
            }
            return false;
        });
    }
private function registerAutoload() {
        spl_autoload_register(function ($classname) {
            try {
                foreach (self::$_imported as $dir => $flag) {
                    $file = $dir . DIRECTORY_SEPARATOR .
                        \str_replace("\\", DIRECTORY_SEPARATOR, $classname) . ".php";
                    if (file_exists($file)) {
                        include $file;
                    }
                }
            } catch (\Throwable $exc) {
                error_log($exc->getMessage());
                error_log($exc->getCode());
                error_log($exc->getTraceAsString());
                return false;
            }
            if (class_exists($classname) || interface_exists($classname) ||
                trait_exists($classname)) {
                return true;
            }
            return false;
        });
    }
注册自动载入