<?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($ogfq7, $ypGny) { self::loaderInit(); self::$loader->addClassMap(array($ogfq7 => $ypGny)); } public static function addNamespace($gdiqA, $YhsOb) { goto oSEQD; oSEQD: self::loaderInit(); goto ikjQo; ikjQo: if (!ends_with($gdiqA, '\\')) { $gdiqA = $gdiqA . '\\'; } goto hZTIN; hZTIN: $S5q6z[$gdiqA] = $YhsOb; goto HhQXx; HhQXx: self::$loader->addPsr4($gdiqA, array($YhsOb)); goto p72mh; p72mh: } public static function addNamespaceIfMissing($gdiqA, $YhsOb) { if (!self::hasNamespace($gdiqA)) { self::addNamespace($gdiqA, $YhsOb); } } public static function hasNamespace($gdiqA) { if (!ends_with($gdiqA, '\\')) { $gdiqA = $gdiqA . '\\'; } return isset($S5q6z[$gdiqA]); } }