# wpide/3.4.1/App/AppConfig.php

WPIDE – File Manager &amp; Code Editor, version 3.4.1. 28 lines.

- Page: https://pluginprobe.com/plugins/wpide/3.4.1/code/App/AppConfig.php
- Raw: https://pluginprobe.com/plugins/wpide/3.4.1/raw/App/AppConfig.php
- Modified: 2022-07-30T20:33:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpide/3.4.1/code/App/AppConfig.php#L10-L20`.

```php
<?php
namespace WPIDE\App;

use WPIDE\App\Config\Config;
use const WPIDE\Constants\DIR;

class AppConfig {

    protected static $config;

    public static function load(): Config
    {
        if(!empty(self::$config )) {
            return self::$config;
        }

        self::$config = new Config(require DIR.'_configuration.php');

        return self::$config;
    }

    public static function get($key, $default = null)
    {
        self::load();

        return self::$config->get($key, $default);
    }
}
```
