# wpide/3.4.5/App/AppConfig.php

WPIDE – File Manager &amp; Code Editor, version 3.4.5. 43 lines.

- Page: https://pluginprobe.com/plugins/wpide/3.4.5/code/App/AppConfig.php
- Raw: https://pluginprobe.com/plugins/wpide/3.4.5/raw/App/AppConfig.php
- Modified: 2022-09-27T16:12:52+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.5/code/App/AppConfig.php#L10-L20`.

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

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

class AppConfig {

    /* @var $config Config */
    protected static $config;

    public static function load(): Config
    {
        self::$config = empty(self::$config) ? new Config(require DIR.'_configuration.php') : self::$config;
        return self::$config;
    }

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

    public static function update($key , $value)
    {
        return self::load()->update($key, $value);
    }

    public static function delete($key)
    {
        self::load()->delete($key);
    }

    public static function getField($key)
    {
        return self::load()->getField($key);
    }

    public static function fieldExists($key): bool
    {
        return self::load()->fieldExists($key);
    }
}

```
