src/Apps/Eventual/Subscribers/Loader.php
public function registerConfig(string $filePath = null)
    {
        is_file($filePath) || $filePath = App::getBasePath() . $filePath;

        if (is_file($filePath)) {
            /** @noinspection PhpIncludeInspection */
            $configItems = require_once $filePath;

            if (is_array($configItems)) {
                foreach ($configItems as $key => $value) {
                    if (Config::exists($key)) {
                        Config::merge($key, $value);
                    } else {
                        Config::item($key, $value);
                    }
                }
            }

            if ($value = Config::exists('errors.error_reporting', null)) {
                ini_set('error_reporting', $value);
            }

            if ($value = Config::exists('errors.display_errors', null)) {
                ini_set('display_errors', $value);
            }

            Event::dispatch('minimal.loaded.config', [$filePath,
                is_array($configItems) ? $configItems : []
            ]);
        }
    }
public function registerConfig(string $filePath = null)
    {
        is_file($filePath) || $filePath = App::getBasePath() . $filePath;

        if (is_file($filePath)) {
            /** @noinspection PhpIncludeInspection */
            $configItems = require_once $filePath;

            if (is_array($configItems)) {
                foreach ($configItems as $key => $value) {
                    if (Config::exists($key)) {
                        Config::merge($key, $value);
                    } else {
                        Config::item($key, $value);
                    }
                }
            }

            if ($value = Config::exists('errors.error_reporting', null)) {
                ini_set('error_reporting', $value);
            }

            if ($value = Config::exists('errors.display_errors', null)) {
                ini_set('display_errors', $value);
            }

            Event::dispatch('minimal.loaded.config', [$filePath,
                is_array($configItems) ? $configItems : []
            ]);
        }
    }
public function registerConfig ( string $ filePath = null ) { is_file ( $ filePath ) || $ filePath = App :: getBasePath ( ) . $ filePath ; if ( is_file ( $ filePath ) ) { /** @noinspection PhpIncludeInspection */ $ configItems = require_once $ filePath ; if ( is_array ( $ configItems ) ) { foreach ( $ configItems as $ key => $ value ) { if ( Config :: exists ( $ key ) ) { Config :: merge ( $ key , $ value ) ; } else { Config :: item ( $ key , $ value ) ; } } } if ( $ value = Config :: exists ( 'errors.error_reporting' , null ) ) { ini_set ( 'error_reporting' , $ value ) ; } if ( $ value = Config :: exists ( 'errors.display_errors' , null ) ) { ini_set ( 'display_errors' , $ value ) ; } Event :: dispatch ( 'minimal.loaded.config' , [ $ filePath , is_array ( $ configItems ) ? $ configItems : [ ] ] ) ; } }
Registers the main config file.
It stores the array items from the main config file in the Config object.
It will merge recursively with other items in the Config object.
It eventually sets the phpini error_reporting and display_errors

@param null $filePath

@throws \Maduser\Minimal\Config\Exceptions\KeyDoesNotExistException
Registers the main config file . It stores the array items from the main config file in the Config object . It will merge recursively with other items in the Config object . It eventually sets the phpini error_reporting and display_errors