<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Type; use Illuminate\Support\Str; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConstantUtil; class TypeUtil { public static function dumpJsFile($WV1kz) { goto pWCu_; GazhI: $Afv_G = array(); goto qjCNF; pWCu_: $WDzIv = array(); goto MSCzp; qjCNF: $Afv_G[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto oKwJD; MSCzp: foreach ($WV1kz as $aHcWY) { $WDzIv[class_basename($aHcWY)] = TypeUtil::dump($aHcWY); } goto GazhI; b_moj: return Response::raw(join('
', $Afv_G), array('Content-Type' => 'text/plain')); goto blHyf; oKwJD: foreach ($WDzIv as $sQIr6 => $RCoRX) { $Afv_G[] = "export const {$sQIr6} = " . json_encode($RCoRX, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ';'; } goto b_moj; blHyf: } public static function name($HAFOV, $Gttsd) { goto MmJTi; X3NQC: return null; goto YfMDC; ectVu: foreach ($Nq2Ir as $RTHJ6 => $F6Fus) { if ($RTHJ6 == $Gttsd) { return $F6Fus; } } goto X3NQC; MmJTi: $Nq2Ir = $HAFOV::getList(); goto ectVu; YfMDC: } public static function filter($HAFOV, $q2nIJ) { goto Ql_qr; ECwXf: $z8oGH = array(); goto S7ua2; Ql_qr: $Nq2Ir = $HAFOV::getList(); goto ECwXf; S7ua2: foreach ($Nq2Ir as $RTHJ6 => $F6Fus) { if (in_array($RTHJ6, $q2nIJ)) { $z8oGH[$RTHJ6] = $F6Fus; } } goto LOhIW; LOhIW: return $z8oGH; goto oau4S; oau4S: } public static function dump($PbprP) { goto C3bsR; N7usK: foreach ($v0WGh as $jPfeB => $Gttsd) { goto T2uFq; T2uFq: $q2nIJ[$jPfeB]['key'] = $jPfeB; goto v4vMX; v4vMX: $q2nIJ[$jPfeB]['value'] = $Gttsd; goto k4g4W; k4g4W: $q2nIJ[$jPfeB]['name'] = isset($eYURB[$Gttsd]) ? $eYURB[$Gttsd] : null; goto TgH9T; TgH9T: } goto jxRV2; C3bsR: $v0WGh = ConstantUtil::dump($PbprP); goto ichJA; jxRV2: return $q2nIJ; goto OTwko; ichJA: $eYURB = $PbprP::getList(); goto N7usK; OTwko: } public static function colorGuessMap($nVrqt) { goto mnU7K; l_NCu: if (isset($rDpP4[$nVrqt])) { return $rDpP4[$nVrqt]; } goto qYKE6; mnU7K: static $rDpP4 = array(); goto l_NCu; lPMhR: return $eYURB; goto z9Wna; ZQf5r: $rDpP4[$nVrqt] = $eYURB; goto lPMhR; g4wq1: $Jf700 = array('fail' => 'danger', 'error' => 'danger', 'wait_verify' => 'danger', 'wait_pay' => 'warning', 'danger' => 'warning', 'running' => 'warning', 'refund' => 'warning', 'success' => 'success', 'verified' => 'success', 'pass' => 'success', 'reject' => 'danger', 'wait' => 'muted', 'canceled' => 'muted', 'disabled' => 'muted', 'completed' => 'success', 'finish' => 'success', 'converting' => 'warning', 'sending' => 'warning', 'ignore' => 'muted', 'expired' => 'muted', 'info' => 'primary', 'unread' => 'danger', 'read' => 'muted', 'processed' => 'success', 'verifying' => 'warning', 'online' => 'success', 'payed' => 'success', 'wait_process' => 'warning', 'deleted' => 'muted', 'invalid' => 'warning', 'valid' => 'success'); goto kN33j; qYKE6: $eYURB = array(); goto g4wq1; kN33j: foreach (ConstantUtil::dump($nVrqt) as $RTHJ6 => $F6Fus) { $RTHJ6 = strtolower($RTHJ6); foreach ($Jf700 as $mS44U => $L6xtX) { if (Str::contains($RTHJ6, $mS44U)) { $eYURB[$F6Fus] = $L6xtX; break; } } } goto ZQf5r; z9Wna: } }