core/Config.php
public static function get(string $key = null, $def = null)
    {
        if ($key == null) {
            return self::$global;
        }
        if (preg_match('@^(\w+)\.(.+)$@', $key, $m)) {
            $name = trim($m[1]);
            if (!isset(self::$loaded[$name])) {
                self::load($name);
            }
            if (trim($m[2]) == '*') {
                return self::getSection($name);
            }
        }
        return isset(self::$global[$key]) ? self::$global[$key] : $def;
    }
public static function get(string $key = null, $def = null)
    {
        if ($key == null) {
            return self::$global;
        }
        if (preg_match('@^(\w+)\.(.+)$@', $key, $m)) {
            $name = trim($m[1]);
            if (!isset(self::$loaded[$name])) {
                self::load($name);
            }
            if (trim($m[2]) == '*') {
                return self::getSection($name);
            }
        }
        return isset(self::$global[$key]) ? self::$global[$key] : $def;
    }
获取配置项
@param string $key
@param string $def 默认值
@return mixed|string