<?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($ax5t3) { goto aWIy8; tDrI8: if (isset($rDFjg[$ax5t3])) { return $rDFjg[$ax5t3]; } goto NLwWV; uPwIZ: if (null === $rDFjg) { goto j86VZ; ST90I: if (file_exists($qsQD8)) { $rDFjg = @json_decode(file_get_contents($qsQD8), true); } goto u1wpU; u1wpU: if (empty($rDFjg)) { $rDFjg = array(); } goto Wmuxi; j86VZ: $qsQD8 = base_path('meta.json'); goto ST90I; Wmuxi: } goto tDrI8; aWIy8: static $rDFjg = null; goto tAI1X; Gacmf: return '-'; goto V5xvL; NLwWV: switch ($ax5t3) { 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 Gacmf; tAI1X: BizException::throwsIf('Meta信息不包含' . $ax5t3, !in_array($ax5t3, self::$supportKeys)); goto uPwIZ; V5xvL: } }