<?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($O9Vtg) { self::$instances[] = $O9Vtg; } public static function registerQuick($WUQUn, $uNY85, $g_4iP = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($WUQUn, $uNY85, $g_4iP)); } public static function all() { foreach (self::$instances as $MFVkb => $YxV2x) { if ($YxV2x instanceof \Closure) { self::$instances[$MFVkb] = call_user_func($YxV2x); } else { if (is_string($YxV2x)) { self::$instances[$MFVkb] = app($YxV2x); } } } return self::$instances; } public static function call($M9yHT, $GmXmn) { goto F6bWM; JR8eW: list($PTLbU, $SHMn7) = explode('::', $M9yHT); goto ciuvh; ZXlt9: list($rEnAs, $CMJ6j) = explode('@', $h42gY); goto JR8eW; ciuvh: if (!starts_with($PTLbU, '\\')) { $PTLbU = '\\' . $PTLbU; } goto XdNpu; mGtEP: BizException::throwsIfEmpty('首页不存在', $h42gY); goto ZXlt9; NHzw8: return app()->call(array($rEnAs, $CMJ6j)); goto b0PrG; kTv2K: $rEnAs = app($rEnAs); goto NHzw8; F6bWM: $h42gY = null; goto f1aNQ; f1aNQ: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $h42gY = modstart_config('HomePage_HomeMobile'); } if (empty($h42gY)) { $h42gY = modstart_config('HomePage_Home'); } } goto gP9cA; XdNpu: if ($PTLbU == $rEnAs && $SHMn7 == $CMJ6j) { list($rEnAs, $CMJ6j) = explode('@', $GmXmn); } goto kTv2K; gP9cA: if (empty($h42gY)) { $h42gY = $GmXmn; } goto mGtEP; b0PrG: } }