<?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($MsA2r, $yHf3t) { self::loaderInit(); self::$loader->addClassMap(array($MsA2r => $yHf3t)); } public static function addNamespace($OC_qG, $LclBr) { goto yct6X; twm7t: if (!ends_with($OC_qG, '\\')) { $OC_qG = $OC_qG . '\\'; } goto hGHZI; V6MvK: self::$loader->addPsr4($OC_qG, array($LclBr)); goto RMdtx; yct6X: self::loaderInit(); goto twm7t; hGHZI: $qCbgD[$OC_qG] = $LclBr; goto V6MvK; RMdtx: } public static function addNamespaceIfMissing($OC_qG, $LclBr) { if (!self::hasNamespace($OC_qG)) { self::addNamespace($OC_qG, $LclBr); } } public static function hasNamespace($OC_qG) { if (!ends_with($OC_qG, '\\')) { $OC_qG = $OC_qG . '\\'; } return isset($qCbgD[$OC_qG]); } }