<?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($tDnAb) { self::$instances[] = $tDnAb; } public static function registerQuick($H_jRb, $O2USQ, $HWA34 = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($H_jRb, $O2USQ, $HWA34)); } public static function all() { foreach (self::$instances as $KAKiA => $Iim2u) { if ($Iim2u instanceof \Closure) { self::$instances[$KAKiA] = call_user_func($Iim2u); } else { if (is_string($Iim2u)) { self::$instances[$KAKiA] = app($Iim2u); } } } return self::$instances; } public static function call($Y_4ky, $PwSDd) { goto Yq0ud; WW0PW: list($I_UQd, $v8Hka) = explode('::', $Y_4ky); goto t5gWJ; A39Tr: return app()->call(array($taG2l, $aVDlj)); goto UTln8; Yq0ud: $xyZf_ = null; goto F8pZa; t5gWJ: if (!starts_with($I_UQd, '\\')) { $I_UQd = '\\' . $I_UQd; } goto mQ2nM; UjXia: list($taG2l, $aVDlj) = explode('@', $xyZf_); goto WW0PW; F8pZa: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $xyZf_ = modstart_config('HomePage_HomeMobile'); } if (empty($xyZf_)) { $xyZf_ = modstart_config('HomePage_Home'); } } goto Icoal; mQ2nM: if ($I_UQd == $taG2l && $v8Hka == $aVDlj) { list($taG2l, $aVDlj) = explode('@', $PwSDd); } goto z5ijC; eVR7h: BizException::throwsIfEmpty('首页不存在', $xyZf_); goto UjXia; Icoal: if (empty($xyZf_)) { $xyZf_ = $PwSDd; } goto eVR7h; z5ijC: $taG2l = app($taG2l); goto A39Tr; UTln8: } }