<?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($cTFJ4, $aYJAK) { self::loaderInit(); self::$loader->addClassMap(array($cTFJ4 => $aYJAK)); } public static function addNamespace($dqZzr, $VF_G6) { goto VuSVC; xMp_Q: self::$loader->addPsr4($dqZzr, array($VF_G6)); goto uTo6a; NtShb: $zCvNd[$dqZzr] = $VF_G6; goto xMp_Q; flDxr: if (!ends_with($dqZzr, '\\')) { $dqZzr = $dqZzr . '\\'; } goto NtShb; VuSVC: self::loaderInit(); goto flDxr; uTo6a: } public static function addNamespaceIfMissing($dqZzr, $VF_G6) { if (!self::hasNamespace($dqZzr)) { self::addNamespace($dqZzr, $VF_G6); } } public static function hasNamespace($dqZzr) { if (!ends_with($dqZzr, '\\')) { $dqZzr = $dqZzr . '\\'; } return isset($zCvNd[$dqZzr]); } }