<?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($AEqP7, $fWBvH) { self::loaderInit(); self::$loader->addClassMap(array($AEqP7 => $fWBvH)); } public static function addNamespace($yrdE4, $aurrr) { goto nbtoH; nbtoH: self::loaderInit(); goto r4vKI; r4vKI: if (!ends_with($yrdE4, '\\')) { $yrdE4 = $yrdE4 . '\\'; } goto bxkDq; bdPNc: self::$loader->addPsr4($yrdE4, array($aurrr)); goto TJdSL; bxkDq: $mQw9P[$yrdE4] = $aurrr; goto bdPNc; TJdSL: } public static function addNamespaceIfMissing($yrdE4, $aurrr) { if (!self::hasNamespace($yrdE4)) { self::addNamespace($yrdE4, $aurrr); } } public static function hasNamespace($yrdE4) { if (!ends_with($yrdE4, '\\')) { $yrdE4 = $yrdE4 . '\\'; } return isset($mQw9P[$yrdE4]); } }