<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\View; use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; use Module\Vendor\Provider\SiteTemplate\SiteTemplateProvider; class ResponsiveView { public static function templateRoot() { goto mWmHb; mWmHb: static $geCFR = null; goto ljInh; ljInh: static $iXOwY = null; goto Fke3s; VN4Ho: $B0tr0 = Input::get('msSiteTemplate', null); goto AyOe2; AyOe2: if (!empty($B0tr0)) { $geCFR = SiteTemplateProvider::get($B0tr0); if (!empty($geCFR)) { Session::put('msSiteTemplate', $B0tr0); } } goto KQYAk; INTy7: return $iXOwY; goto s323X; KQYAk: if (empty($geCFR)) { $B0tr0 = Session::get('msSiteTemplate', null); if (!empty($B0tr0)) { $geCFR = SiteTemplateProvider::get($B0tr0); if (empty($geCFR)) { Session::forget('msSiteTemplate'); } } } goto De8fi; Fke3s: if (null !== $iXOwY) { return $iXOwY; } goto rEi8B; De8fi: if (empty($geCFR)) { $U5_Jj = modstart_config()->getWithEnv('siteTemplate', 'default'); $geCFR = SiteTemplateProvider::get($U5_Jj); } goto Mamj1; Mamj1: if ($geCFR && $geCFR->root()) { $iXOwY = $geCFR->root(); } else { $iXOwY = "theme.{$U5_Jj}"; } goto INTy7; rEi8B: static $U5_Jj = 'default'; goto VN4Ho; s323X: } public static function templateRootRealpath($oXHYw) { goto At8Dl; Li4CJ: if (Str::startsWith($oIZ4g, 'module::')) { $oIZ4g = str_replace(array('::', '.'), '/', $oIZ4g); $oIZ4g = base_path($oIZ4g); } else { if (Str::startsWith($oIZ4g, 'theme.')) { goto wBawn; wBawn: $oIZ4g = 'resources/views/' . str_replace(array('.'), '/', $oIZ4g); goto llQb9; M8Nt3: if (!file_exists($oIZ4g)) { $oIZ4g = base_path('module/' . $oXHYw . '/View'); } goto Qj2r2; Qj2r2: if (!file_exists($oIZ4g)) { $oIZ4g = base_path('resources/views/theme/default'); } goto rHGI1; llQb9: $oIZ4g = base_path($oIZ4g); goto M8Nt3; rHGI1: } else { $oIZ4g = base_path($oIZ4g); } } goto v61BW; v61BW: return rtrim($oIZ4g, '\\/') . '/'; goto Poc_s; At8Dl: $oIZ4g = self::templateRoot(); goto Li4CJ; Poc_s: } }