<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Module; use Composer\Autoload\ClassLoader; class ModuleClassLoader { private static $loader = null; private static $namespacesAdded = array(); private static function loaderInit() { if (null == self::$loader) { self::$loader = app(ClassLoader::class); self::$loader->register(true); } } public static function addClass($t7pan, $WF06r) { self::loaderInit(); self::$loader->addClassMap(array($t7pan => $WF06r)); } public static function addNamespace($edO__, $QTKvb) { goto K6rer; OsbPj: $hoVSa[$edO__] = $QTKvb; goto FM5Ii; FM5Ii: self::$loader->addPsr4($edO__, array($QTKvb)); goto M6rpK; K6rer: self::loaderInit(); goto sa6O4; sa6O4: if (!ends_with($edO__, '\\')) { $edO__ = $edO__ . '\\'; } goto OsbPj; M6rpK: } public static function addNamespaceIfMissing($edO__, $QTKvb) { if (!self::hasNamespace($edO__)) { self::addNamespace($edO__, $QTKvb); } } public static function hasNamespace($edO__) { if (!ends_with($edO__, '\\')) { $edO__ = $edO__ . '\\'; } return isset($hoVSa[$edO__]); } }