<?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($KrsM3, $qsQD8) { self::loaderInit(); self::$loader->addClassMap(array($KrsM3 => $qsQD8)); } public static function addNamespace($Uz_X9, $tGXA6) { goto EppK4; dJlja: self::$loader->addPsr4($Uz_X9, array($tGXA6)); goto HK61j; Nl6i1: $H5GMT[$Uz_X9] = $tGXA6; goto dJlja; EppK4: self::loaderInit(); goto tzSoT; tzSoT: if (!ends_with($Uz_X9, '\\')) { $Uz_X9 = $Uz_X9 . '\\'; } goto Nl6i1; HK61j: } public static function addNamespaceIfMissing($Uz_X9, $tGXA6) { if (!self::hasNamespace($Uz_X9)) { self::addNamespace($Uz_X9, $tGXA6); } } public static function hasNamespace($Uz_X9) { if (!ends_with($Uz_X9, '\\')) { $Uz_X9 = $Uz_X9 . '\\'; } return isset($H5GMT[$Uz_X9]); } }