<?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($cl6c3, $RLMU5) { self::loaderInit(); self::$loader->addClassMap(array($cl6c3 => $RLMU5)); } public static function addNamespace($CyUPg, $S3tfG) { goto n1oCW; ni6wu: if (!ends_with($CyUPg, '\\')) { $CyUPg = $CyUPg . '\\'; } goto c4Zqt; n1oCW: self::loaderInit(); goto ni6wu; c4Zqt: $s3pAu[$CyUPg] = $S3tfG; goto o2hyC; o2hyC: self::$loader->addPsr4($CyUPg, array($S3tfG)); goto zdwyZ; zdwyZ: } public static function addNamespaceIfMissing($CyUPg, $S3tfG) { if (!self::hasNamespace($CyUPg)) { self::addNamespace($CyUPg, $S3tfG); } } public static function hasNamespace($CyUPg) { if (!ends_with($CyUPg, '\\')) { $CyUPg = $CyUPg . '\\'; } return isset($s3pAu[$CyUPg]); } }