<?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($BBQtk) { goto WddYC; r9Xjr: foreach ($zA6lu as $L4owo => $f8Hsc) { $cgjRu[] = "export const {$L4owo} = " . json_encode($f8Hsc, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ';'; } goto sBd7d; sBd7d: return Response::raw(join('
', $cgjRu), array('Content-Type' => 'text/plain')); goto P3_jB; WddYC: $zA6lu = array(); goto q6wdf; q6wdf: foreach ($BBQtk as $FDNZs) { $zA6lu[class_basename($FDNZs)] = TypeUtil::dump($FDNZs); } goto oKR4l; XSnEO: $cgjRu[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto r9Xjr; oKR4l: $cgjRu = array(); goto XSnEO; P3_jB: } public static function name($msr_l, $wvO30) { goto ucAzz; ucAzz: $ttiXA = $msr_l::getList(); goto guX5r; guX5r: foreach ($ttiXA as $plrwN => $uTz0e) { if ($plrwN == $wvO30) { return $uTz0e; } } goto bZZSv; bZZSv: return null; goto makc2; makc2: } public static function filter($msr_l, $kB0Us) { goto DLY4q; DLY4q: $ttiXA = $msr_l::getList(); goto VXLLz; xKQOQ: foreach ($ttiXA as $plrwN => $uTz0e) { if (in_array($plrwN, $kB0Us)) { $udDBo[$plrwN] = $uTz0e; } } goto R2jYb; R2jYb: return $udDBo; goto EFvCM; VXLLz: $udDBo = array(); goto xKQOQ; EFvCM: } public static function dump($q5sLX) { goto SHgc4; FbAsB: return $kB0Us; goto Qebft; q6bPe: $WOJ4L = $q5sLX::getList(); goto VSSgq; VSSgq: foreach ($wUpSt as $dwwIV => $wvO30) { goto kWgS1; cvSjM: $kB0Us[$dwwIV]['value'] = $wvO30; goto ZMwbk; kWgS1: $kB0Us[$dwwIV]['key'] = $dwwIV; goto cvSjM; ZMwbk: $kB0Us[$dwwIV]['name'] = isset($WOJ4L[$wvO30]) ? $WOJ4L[$wvO30] : null; goto itogy; itogy: } goto FbAsB; SHgc4: $wUpSt = ConstantUtil::dump($q5sLX); goto q6bPe; Qebft: } public static function colorGuessMap($DCjzE) { goto oBjoi; ishoX: $QXsjT[$DCjzE] = $WOJ4L; goto wT8_h; u2bQ0: $CwQ1E = 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 COlcC; wT8_h: return $WOJ4L; goto RlZau; oBjoi: static $QXsjT = array(); goto TQqS5; TQqS5: if (isset($QXsjT[$DCjzE])) { return $QXsjT[$DCjzE]; } goto vzRHG; vzRHG: $WOJ4L = array(); goto u2bQ0; COlcC: foreach (ConstantUtil::dump($DCjzE) as $plrwN => $uTz0e) { $plrwN = strtolower($plrwN); foreach ($CwQ1E as $wuok6 => $XEYK_) { if (Str::contains($plrwN, $wuok6)) { $WOJ4L[$uTz0e] = $XEYK_; break; } } } goto ishoX; RlZau: } }