<?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($oMd7I) { self::$instances[] = $oMd7I; } public static function registerQuick($yP0KF, $NhQtb, $EpKdG = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($yP0KF, $NhQtb, $EpKdG)); } public static function all() { foreach (self::$instances as $kEhTf => $y2Ltn) { if ($y2Ltn instanceof \Closure) { self::$instances[$kEhTf] = call_user_func($y2Ltn); } else { if (is_string($y2Ltn)) { self::$instances[$kEhTf] = app($y2Ltn); } } } return self::$instances; } public static function call($yZ3T0, $eTxZr) { goto YG5j6; ILkIg: BizException::throwsIfEmpty('首页不存在', $pNl1h); goto ODjvs; K6TvE: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $pNl1h = modstart_config('HomePage_HomeMobile'); } if (empty($pNl1h)) { $pNl1h = modstart_config('HomePage_Home'); } } goto I77bB; iFaqH: if ($eJH7A == $vIA1o && $qYymU == $vgAtT) { list($vIA1o, $vgAtT) = explode('@', $eTxZr); } goto TBCFd; I77bB: if (empty($pNl1h)) { $pNl1h = $eTxZr; } goto ILkIg; Z8sL5: list($eJH7A, $qYymU) = explode('::', $yZ3T0); goto SoTkr; TBCFd: $vIA1o = app($vIA1o); goto JTLkl; JTLkl: return app()->call(array($vIA1o, $vgAtT)); goto OH4Z3; ODjvs: list($vIA1o, $vgAtT) = explode('@', $pNl1h); goto Z8sL5; SoTkr: if (!starts_with($eJH7A, '\\')) { $eJH7A = '\\' . $eJH7A; } goto iFaqH; YG5j6: $pNl1h = null; goto K6TvE; OH4Z3: } }