<?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($rvTrU) { goto MfsjV; VPuMN: BizException::throwsIf('Meta信息不包含' . $rvTrU, !in_array($rvTrU, self::$supportKeys)); goto Dec62; NCTLd: switch ($rvTrU) { 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 Dhb5T; Dec62: if (null === $P0j8c) { goto O6qgf; O6qgf: $RLMU5 = base_path('meta.json'); goto E7UwL; E7UwL: if (file_exists($RLMU5)) { $P0j8c = @json_decode(file_get_contents($RLMU5), true); } goto HUcPf; HUcPf: if (empty($P0j8c)) { $P0j8c = array(); } goto EsANs; EsANs: } goto W17dY; W17dY: if (isset($P0j8c[$rvTrU])) { return $P0j8c[$rvTrU]; } goto NCTLd; MfsjV: static $P0j8c = null; goto VPuMN; Dhb5T: return '-'; goto JA8CO; JA8CO: } }