<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; class LangUtil { public static function extractFileLangScripts($qsQD8) { goto nJhG7; qzKqw: return ''; goto k8ve0; qgnAi: if (!file_exists($qsQD8)) { return ''; } goto gJIMD; JeFrw: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $rFmqf, $i5sAZ); goto ypxij; ypxij: if (!empty($i5sAZ[1])) { goto KE7v4; KE7v4: $IqQcx = array(); goto bsRjw; bsRjw: foreach ($i5sAZ[0] as $El_MH) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $El_MH, $z7sMq)) { $IqQcx[$z7sMq[1]] = L($z7sMq[1]); } } goto tElSE; l2FdX: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . json_encode(array_keys($IqQcx), JSON_PRETTY_PRINT) . ') !!}'; goto qqs7j; tElSE: ksort($IqQcx); goto l2FdX; qqs7j: } goto qzKqw; nJhG7: $qsQD8 = base_path($qsQD8); goto qgnAi; gJIMD: $rFmqf = file_get_contents($qsQD8); goto JeFrw; k8ve0: } public static function langScriptPrepare($IqQcx) { goto J8ACq; ezyRn: foreach ($IqQcx as $DtNyo) { $GNrb6[] = '  window.lang[' . json_encode($DtNyo) . ']=' . json_encode(L($DtNyo), JSON_UNESCAPED_UNICODE) . ';'; } goto AHPIS; AHPIS: $GNrb6[] = '})();'; goto fA20E; J8ACq: $GNrb6 = array(); goto EfKf5; Kr0Eh: $GNrb6[] = '  window.lang = window.lang||{};'; goto ezyRn; fA20E: return join('
', $GNrb6); goto e8aqm; EfKf5: $GNrb6[] = '
(function(){'; goto Kr0Eh; e8aqm: } }