src/Config.php
public static function get(string $key = null)
    {
        self::set();

        if (empty($key)) {
            return self::$config;
        }

        $keys  = explode('.', $key);
        $value = self::$config;

        foreach ($keys as $key) {
            if ( ! isset($value[$key])) {
                return null;
            }

            $value = $value[$key];
        }

        return $value;
    }
public static function get(string $key = null)
    {
        self::set();

        if (empty($key)) {
            return self::$config;
        }

        $keys  = explode('.', $key);
        $value = self::$config;

        foreach ($keys as $key) {
            if ( ! isset($value[$key])) {
                return null;
            }

            $value = $value[$key];
        }

        return $value;
    }
public static function get ( string $ key = null ) { self :: set ( ) ; if ( empty ( $ key ) ) { return self :: $ config ; } $ keys = explode ( '.' , $ key ) ; $ value = self :: $ config ; foreach ( $ keys as $ key ) { if ( ! isset ( $ value [ $ key ] ) ) { return null ; } $ value = $ value [ $ key ] ; } return $ value ; }
Get config.

@param string|null $key Key to extract.

@return mixed
Get config .