<?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($jPfeB) { goto ekrSa; amQGS: switch ($jPfeB) { 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 D6R3X; cwBAr: if (null === $YcAuY) { goto pPWet; BC3Qp: if (empty($YcAuY)) { $YcAuY = array(); } goto dSkFD; y5j42: if (file_exists($aYJAK)) { $YcAuY = @json_decode(file_get_contents($aYJAK), true); } goto BC3Qp; pPWet: $aYJAK = base_path('meta.json'); goto y5j42; dSkFD: } goto gx0bf; D6R3X: return '-'; goto rFElU; H3Ojf: BizException::throwsIf('Meta信息不包含' . $jPfeB, !in_array($jPfeB, self::$supportKeys)); goto cwBAr; gx0bf: if (isset($YcAuY[$jPfeB])) { return $YcAuY[$jPfeB]; } goto amQGS; ekrSa: static $YcAuY = null; goto H3Ojf; rFElU: } }