<?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; use ModStart\Core\Util\SerializeUtil; class TypeUtil { public static function dumpJsFile($ex64v) { goto BkA1z; xlTk3: foreach ($ex64v as $pW0Nz) { $KHS8y[class_basename($pW0Nz)] = TypeUtil::dump($pW0Nz); } goto Zte0G; IrDky: foreach ($KHS8y as $ZZMEd => $mpJUG) { $vVYCS[] = "export const {$ZZMEd} = " . SerializeUtil::jsonEncodePretty($mpJUG) . ';'; } goto kJYO2; Zte0G: $vVYCS = array(); goto DJJOy; DJJOy: $vVYCS[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto IrDky; BkA1z: $KHS8y = array(); goto xlTk3; kJYO2: return Response::raw(join('
', $vVYCS), array('Content-Type' => 'text/plain')); goto LPGlQ; LPGlQ: } public static function name($Cs86S, $Mczr_) { goto tgoOd; UyxeP: foreach ($AG1dZ as $B34tD => $Xz28r) { if ($B34tD == $Mczr_) { return $Xz28r; } } goto Dk8I3; tgoOd: $AG1dZ = $Cs86S::getList(); goto UyxeP; Dk8I3: return null; goto Imc3b; Imc3b: } public static function filter($Cs86S, $rTniN) { goto KhwYm; kFmlt: return $Nxn6E; goto HLLpK; HG2Eo: $Nxn6E = array(); goto PyCiK; KhwYm: $AG1dZ = $Cs86S::getList(); goto HG2Eo; PyCiK: foreach ($AG1dZ as $B34tD => $Xz28r) { if (in_array($B34tD, $rTniN)) { $Nxn6E[$B34tD] = $Xz28r; } } goto kFmlt; HLLpK: } public static function dump($qeBS4) { goto O4YZn; GLHUH: return $rTniN; goto C4uIu; O4YZn: $rBDWA = ConstantUtil::dump($qeBS4); goto edZUs; edZUs: $gROn3 = $qeBS4::getList(); goto OHBoQ; OHBoQ: foreach ($rBDWA as $l6tBV => $Mczr_) { goto ahAVH; ahAVH: $rTniN[$l6tBV]['key'] = $l6tBV; goto jQO5A; jQO5A: $rTniN[$l6tBV]['value'] = $Mczr_; goto FTWJM; FTWJM: $rTniN[$l6tBV]['name'] = isset($gROn3[$Mczr_]) ? $gROn3[$Mczr_] : null; goto oCEDi; oCEDi: } goto GLHUH; C4uIu: } public static function colorGuessMap($ohdsk) { goto sy_U8; fKJum: $gROn3 = array(); goto FThsP; D1Pxm: if (isset($boS6M[$ohdsk])) { return $boS6M[$ohdsk]; } goto fKJum; FThsP: $t6Is7 = 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 rAwZK; aCWxm: $boS6M[$ohdsk] = $gROn3; goto wZfgN; wZfgN: return $gROn3; goto jQdlh; sy_U8: static $boS6M = array(); goto D1Pxm; rAwZK: foreach (ConstantUtil::dump($ohdsk) as $B34tD => $Xz28r) { $B34tD = strtolower($B34tD); foreach ($t6Is7 as $hAN5Y => $ry0T1) { if (Str::contains($B34tD, $hAN5Y)) { $gROn3[$Xz28r] = $ry0T1; break; } } } goto aCWxm; jQdlh: } }