<?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($kHDkQ) { self::$instances[] = $kHDkQ; } public static function registerQuick($SLZ1j, $S6sAJ, $AIxhN = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($SLZ1j, $S6sAJ, $AIxhN)); } public static function all() { foreach (self::$instances as $D5qRP => $qGgGl) { if ($qGgGl instanceof \Closure) { self::$instances[$D5qRP] = call_user_func($qGgGl); } else { if (is_string($qGgGl)) { self::$instances[$D5qRP] = app($qGgGl); } } } return self::$instances; } public static function call($kdPXr, $X6lDC) { goto mYRgr; PL3ao: return app()->call(array($DSy2P, $E1Tkt)); goto QsqQH; YeOBK: list($DmAq2, $GIa6l) = explode('::', $kdPXr); goto GBYZb; Xpcwm: $DSy2P = app($DSy2P); goto PL3ao; GBYZb: if (!starts_with($DmAq2, '\\')) { $DmAq2 = '\\' . $DmAq2; } goto hdUak; hdUak: if ($DmAq2 == $DSy2P && $GIa6l == $E1Tkt) { list($DSy2P, $E1Tkt) = explode('@', $X6lDC); } goto Xpcwm; kZdVK: BizException::throwsIfEmpty('首页不存在', $xEfX6); goto W2S8r; W2S8r: list($DSy2P, $E1Tkt) = explode('@', $xEfX6); goto YeOBK; sjGHy: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $xEfX6 = modstart_config('HomePage_HomeMobile'); } if (empty($xEfX6)) { $xEfX6 = modstart_config('HomePage_Home'); } } goto qHlkj; mYRgr: $xEfX6 = null; goto sjGHy; qHlkj: if (empty($xEfX6)) { $xEfX6 = $X6lDC; } goto kZdVK; QsqQH: } }