<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; use ModStart\Core\Util\SerializeUtil; class LangUtil { public static function extractFileLangScripts($WF06r) { goto J4O7z; lHjJC: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $gP2DQ, $YANPA); goto GgMCv; rBlN8: return ''; goto avGsF; J4O7z: $WF06r = base_path($WF06r); goto W4gzM; W4gzM: if (!file_exists($WF06r)) { return ''; } goto Y21SX; Y21SX: $gP2DQ = file_get_contents($WF06r); goto lHjJC; GgMCv: if (!empty($YANPA[1])) { goto skwmW; AqtNy: ksort($LrlwW); goto ZW8Y3; ZW8Y3: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . SerializeUtil::jsonEncodePretty(array_keys($LrlwW)) . ') !!}'; goto Da2pj; hyXkf: foreach ($YANPA[0] as $P1uVJ) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $P1uVJ, $ZTpIG)) { $LrlwW[$ZTpIG[1]] = L($ZTpIG[1]); } } goto AqtNy; skwmW: $LrlwW = array(); goto hyXkf; Da2pj: } goto rBlN8; avGsF: } public static function langScriptPrepare($LrlwW) { goto e5tKr; BfSFq: $oL7Ir[] = '})();'; goto WIS1O; ixlVf: $oL7Ir[] = '  window.lang = window.lang||{};'; goto TA8IK; e5tKr: $oL7Ir = array(); goto wQWAs; TA8IK: foreach ($LrlwW as $vmHGB) { $oL7Ir[] = '  window.lang[' . SerializeUtil::jsonEncode($vmHGB) . ']=' . SerializeUtil::jsonEncode(L($vmHGB)) . ';'; } goto BfSFq; wQWAs: $oL7Ir[] = '
(function(){'; goto ixlVf; WIS1O: return join('
', $oL7Ir); goto q3Hqz; q3Hqz: } }