<?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 xWS1K; stvYk: static $cHUgA = 'default'; goto eVPsu; jMrxY: if (empty($QsTug)) { $cHUgA = modstart_config()->getWithEnv('siteTemplate', 'default'); $QsTug = SiteTemplateProvider::get($cHUgA); } goto wK_Sk; wK_Sk: if ($QsTug && $QsTug->root()) { $w6iTl = $QsTug->root(); } else { $w6iTl = "theme.{$cHUgA}"; } goto e4RdV; XHI92: if (null !== $w6iTl) { return $w6iTl; } goto stvYk; sG4rK: if (!empty($t290O)) { $QsTug = SiteTemplateProvider::get($t290O); if (!empty($QsTug)) { Session::put('msSiteTemplate', $t290O); } } goto swV9p; eVPsu: $t290O = Input::get('msSiteTemplate', null); goto sG4rK; cm3Q8: static $w6iTl = null; goto XHI92; swV9p: if (empty($QsTug)) { $t290O = Session::get('msSiteTemplate', null); if (!empty($t290O)) { $QsTug = SiteTemplateProvider::get($t290O); if (empty($QsTug)) { Session::forget('msSiteTemplate'); } } } goto jMrxY; xWS1K: static $QsTug = null; goto cm3Q8; e4RdV: return $w6iTl; goto HQIlx; HQIlx: } public static function templateRootRealpath($h8H9D) { goto gaSit; gaSit: $SGkWN = self::templateRoot(); goto KB2xD; SOR6M: return rtrim($SGkWN, '\\/') . '/'; goto h2ocN; KB2xD: if (Str::startsWith($SGkWN, 'module::')) { $SGkWN = str_replace(array('::', '.'), '/', $SGkWN); $SGkWN = base_path($SGkWN); } else { if (Str::startsWith($SGkWN, 'theme.')) { goto m0Mfj; kGpmd: if (!file_exists($SGkWN)) { $SGkWN = base_path('resources/views/theme/default'); } goto dlEam; UcGe5: $SGkWN = base_path($SGkWN); goto yHFMC; yHFMC: if (!file_exists($SGkWN)) { $SGkWN = base_path('module/' . $h8H9D . '/View'); } goto kGpmd; m0Mfj: $SGkWN = 'resources/views/' . str_replace(array('.'), '/', $SGkWN); goto UcGe5; dlEam: } else { $SGkWN = base_path($SGkWN); } } goto SOR6M; h2ocN: } }