<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\HomePage; use ModStart\Core\Exception\BizException; use ModStart\Core\Util\AgentUtil; class HomePageProvider { private static $instances = array(DefaultHomePageProvider::class, DefaultMobileHomePageProvider::class); public static function register($sefXk) { self::$instances[] = $sefXk; } public static function registerQuick($MNqDV, $OL4ef, $OUt2n = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($MNqDV, $OL4ef, $OUt2n)); } public static function all() { foreach (self::$instances as $JdFJR => $PSYn9) { if ($PSYn9 instanceof \Closure) { self::$instances[$JdFJR] = call_user_func($PSYn9); } else { if (is_string($PSYn9)) { self::$instances[$JdFJR] = app($PSYn9); } } } return self::$instances; } public static function call($gtN2o, $dV6zn) { goto rMm2t; rMm2t: $JeV46 = null; goto XqrvT; OO40L: $f5xWc = app($f5xWc); goto dzTyX; WPXNm: BizException::throwsIfEmpty('首页不存在', $JeV46); goto ytFBI; dzTyX: return app()->call(array($f5xWc, $OkF3_)); goto dx9C3; uk9Af: if (empty($JeV46)) { $JeV46 = $dV6zn; } goto WPXNm; XqrvT: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $JeV46 = modstart_config('HomePage_HomeMobile'); } if (empty($JeV46)) { $JeV46 = modstart_config('HomePage_Home'); } } goto uk9Af; yjI1W: if (!starts_with($PLPrS, '\\')) { $PLPrS = '\\' . $PLPrS; } goto eZ3aM; Q4W1t: list($PLPrS, $lcw5k) = explode('::', $gtN2o); goto yjI1W; eZ3aM: if ($PLPrS == $f5xWc && $lcw5k == $OkF3_) { list($f5xWc, $OkF3_) = explode('@', $dV6zn); } goto OO40L; ytFBI: list($f5xWc, $OkF3_) = explode('@', $JeV46); goto Q4W1t; dx9C3: } }