<?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($HQKqq) { goto bFQFT; HhaWS: switch ($HQKqq) { 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 dFw1z; yp5n7: if (isset($I7DW0[$HQKqq])) { return $I7DW0[$HQKqq]; } goto HhaWS; VKuNd: BizException::throwsIf('Meta信息不包含' . $HQKqq, !in_array($HQKqq, self::$supportKeys)); goto v9_EE; v9_EE: if (null === $I7DW0) { goto iIMp7; iIMp7: $sCmIC = base_path('meta.json'); goto JAcR9; KUOT1: if (empty($I7DW0)) { $I7DW0 = array(); } goto WOYDp; JAcR9: if (file_exists($sCmIC)) { $I7DW0 = @json_decode(file_get_contents($sCmIC), true); } goto KUOT1; WOYDp: } goto yp5n7; dFw1z: return '-'; goto mCp0a; bFQFT: static $I7DW0 = null; goto VKuNd; mCp0a: } }