<?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 lEVFf; eb6Ug: if ($gzdnL && $gzdnL->root()) { $maIdR = $gzdnL->root(); } else { $maIdR = "theme.{$ANoDZ}"; } goto Cd9SI; lEVFf: static $gzdnL = null; goto z9Tdc; hoFs8: if (empty($gzdnL)) { $WKwBW = Session::get('msSiteTemplate', null); if (!empty($WKwBW)) { $gzdnL = SiteTemplateProvider::get($WKwBW); if (empty($gzdnL)) { Session::forget('msSiteTemplate'); } } } goto fZfwD; z9Tdc: static $maIdR = null; goto kZRvg; Cd9SI: return $maIdR; goto CdvX7; baQRZ: $WKwBW = Input::get('msSiteTemplate', null); goto ko8B1; Px7mZ: static $ANoDZ = 'default'; goto baQRZ; kZRvg: if (null !== $maIdR) { return $maIdR; } goto Px7mZ; ko8B1: if (!empty($WKwBW)) { $gzdnL = SiteTemplateProvider::get($WKwBW); if (!empty($gzdnL)) { Session::put('msSiteTemplate', $WKwBW); } } goto hoFs8; fZfwD: if (empty($gzdnL)) { $ANoDZ = modstart_config()->getWithEnv('siteTemplate', 'default'); $gzdnL = SiteTemplateProvider::get($ANoDZ); } goto eb6Ug; CdvX7: } public static function templateRootRealpath($vbusR) { goto vj75R; vj75R: $SksVn = self::templateRoot(); goto G47Ef; z_2x1: return rtrim($SksVn, '\\/') . '/'; goto ATOgV; G47Ef: if (Str::startsWith($SksVn, 'module::')) { $SksVn = str_replace(array('::', '.'), '/', $SksVn); $SksVn = base_path($SksVn); } else { if (Str::startsWith($SksVn, 'theme.')) { goto hUoTx; xja2w: $SksVn = base_path($SksVn); goto T6ERf; T6ERf: if (!file_exists($SksVn)) { $SksVn = base_path('module/' . $vbusR . '/View'); } goto cEPtI; cEPtI: if (!file_exists($SksVn)) { $SksVn = base_path('resources/views/theme/default'); } goto tkedM; hUoTx: $SksVn = 'resources/views/' . str_replace(array('.'), '/', $SksVn); goto xja2w; tkedM: } else { $SksVn = base_path($SksVn); } } goto z_2x1; ATOgV: } }