<?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($yzKqK) { self::$instances[] = $yzKqK; } public static function registerQuick($oa5ye, $qSSx_, $zpMuS = array(AbstractHomePageProvider::TYPE_PC, AbstractHomePageProvider::TYPE_MOBILE)) { self::register(QuickHomePageProvider::make($oa5ye, $qSSx_, $zpMuS)); } public static function all() { foreach (self::$instances as $ynzcc => $nfRLq) { if ($nfRLq instanceof \Closure) { self::$instances[$ynzcc] = call_user_func($nfRLq); } else { if (is_string($nfRLq)) { self::$instances[$ynzcc] = app($nfRLq); } } } return self::$instances; } public static function call($gixis, $bhLjn) { goto rO1b0; Tu1hY: BizException::throwsIfEmpty('首页不存在', $GagqQ); goto fGDfi; ITKOd: list($tSDNh, $bm6FA) = explode('::', $gixis); goto I7F7Q; nm16K: $v3iL9 = app($v3iL9); goto Szljc; Szljc: return app()->call(array($v3iL9, $vB7yU)); goto dUJnJ; rkENm: if (modstart_config('HomePage_Enable', false)) { if (AgentUtil::isMobile()) { $GagqQ = modstart_config('HomePage_HomeMobile'); } if (empty($GagqQ)) { $GagqQ = modstart_config('HomePage_Home'); } } goto Bz4SZ; fGDfi: list($v3iL9, $vB7yU) = explode('@', $GagqQ); goto ITKOd; I7F7Q: if (!starts_with($tSDNh, '\\')) { $tSDNh = '\\' . $tSDNh; } goto AcLKV; Bz4SZ: if (empty($GagqQ)) { $GagqQ = $bhLjn; } goto Tu1hY; rO1b0: $GagqQ = null; goto rkENm; AcLKV: if ($tSDNh == $v3iL9 && $bm6FA == $vB7yU) { list($v3iL9, $vB7yU) = explode('@', $bhLjn); } goto nm16K; dUJnJ: } }