<?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 r2Vv3; ezJPM: $WhYC0 = Input::get('msSiteTemplate', null); goto C063z; bgAHg: if (empty($RMN4M)) { $CbPJ0 = modstart_config()->getWithEnv('siteTemplate', 'default'); $RMN4M = SiteTemplateProvider::get($CbPJ0); } goto JK8wI; dcsE4: if (empty($RMN4M)) { $WhYC0 = Session::get('msSiteTemplate', null); if (!empty($WhYC0)) { $RMN4M = SiteTemplateProvider::get($WhYC0); if (empty($RMN4M)) { Session::forget('msSiteTemplate'); } } } goto bgAHg; cPpQT: if (null !== $x7avL) { return $x7avL; } goto UQhk2; x1R7M: return $x7avL; goto ssGtg; UQhk2: static $CbPJ0 = 'default'; goto ezJPM; r2Vv3: static $RMN4M = null; goto t_La5; C063z: if (!empty($WhYC0)) { $RMN4M = SiteTemplateProvider::get($WhYC0); if (!empty($RMN4M)) { Session::put('msSiteTemplate', $WhYC0); } } goto dcsE4; JK8wI: if ($RMN4M && $RMN4M->root()) { $x7avL = $RMN4M->root(); } else { $x7avL = "theme.{$CbPJ0}"; } goto x1R7M; t_La5: static $x7avL = null; goto cPpQT; ssGtg: } public static function templateRootRealpath($CiBrR) { goto jRKcS; zbows: if (Str::startsWith($XhKKF, 'module::')) { $XhKKF = str_replace(array('::', '.'), '/', $XhKKF); $XhKKF = base_path($XhKKF); } else { if (Str::startsWith($XhKKF, 'theme.')) { goto Wmwuj; o1lOh: if (!file_exists($XhKKF)) { $XhKKF = base_path('module/' . $CiBrR . '/View'); } goto JrhHj; JrhHj: if (!file_exists($XhKKF)) { $XhKKF = base_path('resources/views/theme/default'); } goto SjJQ5; Wmwuj: $XhKKF = 'resources/views/' . str_replace(array('.'), '/', $XhKKF); goto jnX_Q; jnX_Q: $XhKKF = base_path($XhKKF); goto o1lOh; SjJQ5: } else { $XhKKF = base_path($XhKKF); } } goto b14NM; jRKcS: $XhKKF = self::templateRoot(); goto zbows; b14NM: return rtrim($XhKKF, '\\/') . '/'; goto XVcxq; XVcxq: } }