<?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($pXrNS) { self::$instances[] = $pXrNS; } public static function registerQuick($DvG1n, $cgUTY, $zTlk4 = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($DvG1n, $cgUTY, $zTlk4)); } public static function all() { foreach (self::$instances as $F4wee => $SxG_W) { if ($SxG_W instanceof \Closure) { self::$instances[$F4wee] = call_user_func($SxG_W); } else { if (is_string($SxG_W)) { self::$instances[$F4wee] = app($SxG_W); } } } return self::$instances; } public static function call($cZVJm, $N5fb8) { goto Eenwr; YbZMH: if ($LL5z6 == $RI2ai && $EvdQB == $pvtT4) { list($RI2ai, $pvtT4) = explode('@', $N5fb8); } goto DaT0R; eZJ19: BizException::throwsIfEmpty('首页不存在', $OCy5O); goto iNK8g; fLw3J: if (!starts_with($LL5z6, '\\')) { $LL5z6 = '\\' . $LL5z6; } goto YbZMH; DaT0R: $RI2ai = app($RI2ai); goto cU2eu; ezYKS: if (empty($OCy5O)) { $OCy5O = $N5fb8; } goto eZJ19; Eenwr: $OCy5O = null; goto hIi8I; Zv_BX: list($LL5z6, $EvdQB) = explode('::', $cZVJm); goto fLw3J; cU2eu: return app()->call(array($RI2ai, $pvtT4)); goto wpmgn; iNK8g: list($RI2ai, $pvtT4) = explode('@', $OCy5O); goto Zv_BX; hIi8I: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $OCy5O = modstart_config('HomePage_HomeMobile'); } if (empty($OCy5O)) { $OCy5O = modstart_config('HomePage_Home'); } } goto ezYKS; wpmgn: } }