<?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($oMJcb) { goto skVQ5; gxAT6: if (null === $RR35j) { goto LZMCH; QDv0z: if (file_exists($WF06r)) { $RR35j = @json_decode(file_get_contents($WF06r), true); } goto yIiof; yIiof: if (empty($RR35j)) { $RR35j = array(); } goto Dwuqo; LZMCH: $WF06r = base_path('meta.json'); goto QDv0z; Dwuqo: } goto yI4qA; q9lyf: BizException::throwsIf('Meta信息不包含' . $oMJcb, !in_array($oMJcb, self::$supportKeys)); goto gxAT6; zlcXP: return '-'; goto B0W0b; skVQ5: static $RR35j = null; goto q9lyf; yI4qA: if (isset($RR35j[$oMJcb])) { return $RR35j[$oMJcb]; } goto lasfi; lasfi: switch ($oMJcb) { 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 zlcXP; B0W0b: } }