<?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($GgiJ8, $sCmIC) { self::loaderInit(); self::$loader->addClassMap(array($GgiJ8 => $sCmIC)); } public static function addNamespace($jK1Ji, $adFNb) { goto nz1d3; OdNxm: $iPbAG[$jK1Ji] = $adFNb; goto DO_sx; DO_sx: self::$loader->addPsr4($jK1Ji, array($adFNb)); goto d7hkJ; nz1d3: self::loaderInit(); goto D7Tv7; D7Tv7: if (!ends_with($jK1Ji, '\\')) { $jK1Ji = $jK1Ji . '\\'; } goto OdNxm; d7hkJ: } public static function addNamespaceIfMissing($jK1Ji, $adFNb) { if (!self::hasNamespace($jK1Ji)) { self::addNamespace($jK1Ji, $adFNb); } } public static function hasNamespace($jK1Ji) { if (!ends_with($jK1Ji, '\\')) { $jK1Ji = $jK1Ji . '\\'; } return isset($iPbAG[$jK1Ji]); } }