<?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($ctZxD) { goto Vkcni; zbqIF: $rFmqf[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto sV8zJ; zweeH: return Response::raw(join('
', $rFmqf), array('Content-Type' => 'text/plain')); goto QYcW3; Vkcni: $UwEmk = array(); goto OMdbW; s7iAv: $rFmqf = array(); goto zbqIF; OMdbW: foreach ($ctZxD as $bOB5d) { $UwEmk[class_basename($bOB5d)] = TypeUtil::dump($bOB5d); } goto s7iAv; sV8zJ: foreach ($UwEmk as $rPkIY => $c8Hgd) { $rFmqf[] = "export const {$rPkIY} = " . json_encode($c8Hgd, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ';'; } goto zweeH; QYcW3: } public static function name($anhu0, $FT9zA) { goto ZK0mb; egqCp: foreach ($ddUyu as $kh68j => $tHq0l) { if ($kh68j == $FT9zA) { return $tHq0l; } } goto TWE4Y; TWE4Y: return null; goto ES5_g; ZK0mb: $ddUyu = $anhu0::getList(); goto egqCp; ES5_g: } public static function filter($anhu0, $FO5qv) { goto R5Weg; Ad2ec: return $JCV6U; goto UU_qg; R5Weg: $ddUyu = $anhu0::getList(); goto fl2oU; XETDA: foreach ($ddUyu as $kh68j => $tHq0l) { if (in_array($kh68j, $FO5qv)) { $JCV6U[$kh68j] = $tHq0l; } } goto Ad2ec; fl2oU: $JCV6U = array(); goto XETDA; UU_qg: } public static function dump($ac3f3) { goto pzku3; lyU4Z: return $FO5qv; goto xGqw1; FhQdN: $SRxBF = $ac3f3::getList(); goto x76tr; x76tr: foreach ($sBqI2 as $ax5t3 => $FT9zA) { goto RJia3; aMVxy: $FO5qv[$ax5t3]['name'] = isset($SRxBF[$FT9zA]) ? $SRxBF[$FT9zA] : null; goto CsfFD; RJia3: $FO5qv[$ax5t3]['key'] = $ax5t3; goto CoE6b; CoE6b: $FO5qv[$ax5t3]['value'] = $FT9zA; goto aMVxy; CsfFD: } goto lyU4Z; pzku3: $sBqI2 = ConstantUtil::dump($ac3f3); goto FhQdN; xGqw1: } public static function colorGuessMap($JmOV1) { goto lRCnQ; sSbPk: $ZOgHq[$JmOV1] = $SRxBF; goto agtdJ; uawel: $SRxBF = array(); goto zZ2tF; zZ2tF: $NfVlC = array('fail' => 'danger', 'error' => 'danger', 'wait_verify' => 'danger', 'wait_pay' => 'warning', 'danger' => 'warning', 'running' => '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 xRMF6; xRMF6: foreach (ConstantUtil::dump($JmOV1) as $kh68j => $tHq0l) { $kh68j = strtolower($kh68j); foreach ($NfVlC as $Ul3d4 => $RaGld) { if (Str::contains($kh68j, $Ul3d4)) { $SRxBF[$tHq0l] = $RaGld; break; } } } goto sSbPk; dlYmD: if (isset($ZOgHq[$JmOV1])) { return $ZOgHq[$JmOV1]; } goto uawel; agtdJ: return $SRxBF; goto V2A6c; lRCnQ: static $ZOgHq = array(); goto dlYmD; V2A6c: } }