src/Config.php
public static function load($path = '', $underlay = false, $php_var = 'config') {
        if (!$path) {
            $path = self::$defaultPath;
        }

        $loaded = array_load($path, $php_var);

        if (empty($loaded)) {
            return;
        }

        if (!is_array(self::$data)) {
            self::$data = [];
        }

        if ($underlay) {
            self::$data = array_replace($loaded, self::$data);
        } else {
            self::$data = array_replace(self::$data, $loaded);
        }
    }
public static function load($path = '', $underlay = false, $php_var = 'config') {
        if (!$path) {
            $path = self::$defaultPath;
        }

        $loaded = array_load($path, $php_var);

        if (empty($loaded)) {
            return;
        }

        if (!is_array(self::$data)) {
            self::$data = [];
        }

        if ($underlay) {
            self::$data = array_replace($loaded, self::$data);
        } else {
            self::$data = array_replace(self::$data, $loaded);
        }
    }
Load configuration data from a file.

@param string $path An optional path to load the file from.
@param string $path If true the config will be put under the current config, not over it.
@param string $php_var The name of the php variable to load from if using the php file type.