<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; use ModStart\Core\Exception\BizException; class MetaUtil { private static $supportKeys = array('APP_NAME'); public static function get($dwwIV) { goto EpTv0; Wwe9w: return '-'; goto TgHIP; EpTv0: static $EZHAP = null; goto jyNe3; jyNe3: BizException::throwsIf('Meta信息不包含' . $dwwIV, !in_array($dwwIV, self::$supportKeys)); goto W2_t3; W2_t3: if (null === $EZHAP) { goto N_65i; T8n06: if (file_exists($yHf3t)) { $EZHAP = @json_decode(file_get_contents($yHf3t), true); } goto D8pPf; N_65i: $yHf3t = base_path('meta.json'); goto T8n06; D8pPf: if (empty($EZHAP)) { $EZHAP = array(); } goto CSMBa; CSMBa: } goto TSAs8; TSAs8: if (isset($EZHAP[$dwwIV])) { return $EZHAP[$dwwIV]; } goto wXxP5; wXxP5: switch ($dwwIV) { case 'APP_NAME': if (defined('\\App\\Constant\\AppConstant::APP_NAME')) { return \App\Constant\AppConstant::APP_NAME; } else { if (defined('\\App\\Constant\\AppConstant::APP')) { return \App\Constant\AppConstant::APP; } } return 'UnknownAppName'; } goto Wwe9w; TgHIP: } }