Load the config(s)

@throws PlinthException
542985
private function loadConfig()
	{
		$this->initialConfig = new Config(__APP_CONFIG_PROD);
		$this->config = clone $this->initialConfig;

		if ($this->component !== false && $this->component->hasConfig()) {
			$componentconfig = new Config($this->component->getConfigPath());
			if ($this->component->getMergeDefaultConfig()) {
				$this->config->merge($componentconfig);
			} else {
				$this->config = $componentconfig;
			}
		}
	}
119951
protected function loadConfig()
    {
        $config = new Config(
            \Hail\Facade\Config::get('migrate')
        );

        $this->setConfig($config);
    }
767983
protected function load_config() {
        if (!isset($this->config)) {
            $name = $this->get_name();
            $this->config = get_config("enrol_$name");
        }
    }
116430
public static function load() {
        $configFile = MODULES_DIR . DS . RouteController::$currentModule . '/Config/config.php';

        if (!file_exists($configFile)) {
            $configFile = BASE_DIR . '/config/config.php';
            if (!file_exists($configFile)) {
                throw new \Exception(ExceptionMessages::CONFIG_FILE_NOT_FOUND);
            }
        }

        if (empty(self::$configs)) {
            self::$configs = require_once $configFile;
        }
    }
197159
protected function load()
    {
        if (!$this->isConfigurationLoaded) {
            $this->values = $this->getDefaults();
            $values = $this->getConfigStore()->load();
            if (is_array($values)) {
                $this->values = array_merge($this->getDefaults(), $values);
            }
            $this->values = $this->castValues($this->values);
            $this->isConfigurationLoaded = true;
        }
    }
1144281
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults);

		Validators::assertField($config, 'middlewares', 'array');

		// Register middleware chain builder
		$chain = $builder->addDefinition($this->prefix('chain'))
			->setAutowired(false);

		if ($config['debug'] !== true) {
			$chain->setFactory(ChainBuilder::class);
		} else {
			$chain->setFactory(DebugChainBuilder::class);

			$builder->addDefinition($this->prefix('middlewaresPanel'))
				->setFactory(MiddlewaresPanel::class, [$chain]);
		}
	}
908613
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();

		// Expand config (cause %appDir% etc..)
		$config = $this->validateConfig($this->defaults);
		$config = $this->config = Helpers::expand($config, $builder->parameters);

		foreach ($config['resources'] as $namespace => $resource) {
			if (substr($namespace, -1) !== '\\') {
				throw new RuntimeException(sprintf('Resource "%s" must end with /', $namespace));
			}

			// Merge and validace resource config
			$resource = $this->validateConfig($this->resource, $resource, $namespace);

			// Normalize resource config
			if (is_scalar($resource['paths'])) $resource['paths'] = [$resource['paths']];
			if (is_scalar($resource['excludes'])) $resource['excludes'] = [$resource['excludes']];

			// Find classes of given resource
			$classes = $this->findClasses($namespace, $resource['paths'], $resource['excludes']);

			//  of given resource
			$counter = 1;
			$name = preg_replace('#\W+#', '_', '.' . $namespace);
			foreach ($classes as $class) {
				// Check already registered classes
				if ($builder->getByType($class) !== null) return;

				$def = $builder->addDefinition($this->prefix($name . '.' . ($counter++)))
					->setFactory($class);

				// Merge and validace decorator config
				$decorator = $this->validateConfig($this->decorator, $resource['decorator'], $namespace);

				if ($decorator['tags'] !== []) {
					$def->setTags(Arrays::normalize($decorator['tags'], true));
				}

				if ($decorator['setup'] !== []) {
					foreach ($decorator['setup'] as $setup) {
						if (is_array($setup)) {
							$setup = new Statement(key($setup), array_values($setup));
						}
						$def->addSetup($setup);
					}
				}

				if ($decorator['autowired'] !== null) {
					$def->setAutowired($decorator['autowired']);
				}

				if ($decorator['inject'] !== null) {
					$def->setInject($decorator['inject']);
				}
			}
		}
	}
91015
private function loadConfig()
    {
        $cacheName = $this->mode . '_Phavour_Application_config';
        if (false != ($configs = $this->cache->get($cacheName))) {
            // @codeCoverageIgnoreStart
            $this->config = $configs;
            return;
            // @codeCoverageIgnoreEnd
        }

        $config = array();

        foreach ($this->packagesMetadata as $package) {
            try {
                $finder = new FromArray($package['config_path']);
                $proposedConfig = $finder->getArrayWhereKeysBeginWith($package['package_name']);
                if (is_array($proposedConfig)) {
                    $config = array_merge($config, $proposedConfig);
                }
            } catch (\Exception $e) {
                // Package doesn't have config
            }
        }

        try {
            $finder = new FromArray(
                $this->appDirectory . DIRECTORY_SEPARATOR . 'res' . DIRECTORY_SEPARATOR . 'config.php'
            );
            $appConfig = $finder->getArray();
            if (is_array($appConfig)) {
                $config = array_merge($config, $appConfig);
            }
        } catch (\Exception $e) {
            // No config overrides set
        }

        $this->config = $config;
        $this->cache->set($cacheName, $this->config, 86400);
    }
1337007
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration($this->getAlias());
        $this->processConfiguration($configuration, $configs);

        foreach (Iter::makeOneDimension($configs[0], self::ALIAS) as $key => $value) {
            $container->setParameter($key, $value);
        }
    }
184664
public function loadConfiguration()
    {
        $fileList = $this->buildFileList($this->fileDirectories, $this->fileNames);

        $this->parseConfigurationFiles($fileList);

        $this->mergeConfigurationOption($this->_config, 'configurationPaths', $this->fileDirectories);
    }
280929
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		if ($global['debug'] !== true && $config['debug'] !== true) return;

		$builder->addDefinition($this->prefix('panel'))
			->setFactory(ApiPanel::class);

		$this->loadNegotiationDebugConfiguration();

		// BueScreen - runtime
		ApiBlueScreen::register(Debugger::getBlueScreen());
		ValidationBlueScreen::register(Debugger::getBlueScreen());
	}
1367031
public function load(): void
    {
        if (!$this->path) {
            throw new ConfigException('Configuration directory is not setup');
        }

        $this->config = $this->loadFiles($this->path . '/configs/default');

        if ($this->environment) {
            $customConfig = $this->loadFiles($this->path . '/configs/' . $this->environment);
            $this->config = array_replace_recursive($this->config, $customConfig);
        }
    }
133144
private function loadSettings()
	{
    	// Set initial settings base on the initial config
		$userdefinedsettings = $this->initialConfig->get('settings')?: [];

		$this->initialSettings = new Settings();
		$this->initialSettings->loadSettings($userdefinedsettings);

    	// Set settings
        $userdefinedsettings = $this->config->get('settings')?: [];

		$this->settings = new Settings();
		$this->settings->loadSettings($userdefinedsettings);
    }
46304
public function load()
    {
        if (!empty($this->_statements)) {
            return;
        }

        foreach ($this->data as $type=>$item) {
            if (!is_array($item)) {
                $item = array( $item );
            }
            $use_statements = Config::get('use-statements');
            $adapter_name = isset($use_statements[$type]) ? $use_statements[$type] : null;
            if (!empty($adapter_name)) {
                $cls_name = 'AssetsManager\Package\PresetAdapter\\'.$adapter_name;
                if (@class_exists($cls_name)) {
                    $interfaces = class_implements($cls_name);
                    $config_interface = Config::getInternal('assets-preset-adapter-interface');
                    if (in_array($config_interface, $interfaces)) {
                        if (!isset($this->_statements[$type])) {
                            $this->_statements[$type] = array();
                        }
                        foreach ($item as $item_ctt) {
                            if (!is_array($item_ctt)) {
                                $item_ctt = array( $item_ctt );
                            }
                            $statement = new $cls_name($item_ctt, $this);
                            $statement->parse();
                            $this->_statements[$type][] = $statement;
                        }
                    } else {
                        throw new \DomainException(
                            sprintf('Preset statement class "%s" must implement interface "%s"!',
                                $cls_name, $config_interface)
                        );
                    }
                } else {
                    throw new \DomainException(
                        sprintf('Preset statement class "%s" not found!', $cls_name)
                    );
                }
            } else {
                throw new \LogicException(
                    sprintf('Unknown preset statement type "%s" in preset "%s"!', $type, $this->getName())
                );
            }
        }
    }
1013648
private final function loadConfig(): void
    {
        $this->config = new Config();

        $file = sprintf('%s/app/service/%s/config/config.php', APP_DIR, $this->name);
        if (file_exists($file) && is_array($data = include $file)) {
            $this->config->setData($data);
        }
    }
491780
private function loadConfig()
    {
        /** @var \Illuminate\Config\Repository $config */
        $config = $this->app['config'];

        if ($config->get('optimus.components') === null) {
            $config->set('optimus.components', require __DIR__ . '/config/optimus.components.php');
        }
    }
1130534
private function loadConfigData()
    {
        //Load config data
        $config = laradooConfig();


        $this->suffix = array_key_exists('api-suffix', $config) ? $config['api-suffix'] : $this->suffix;
        $this->suffix = laradooAddCharacter($this->suffix, '/');

        $this->host = array_key_exists('host', $config) ? $config['host'] : $this->host;
        $this->host = laradooRemoveCharacter($this->host, '/');

        $this->db = array_key_exists('db', $config) ? $config['db'] : $this->db;
        $this->username = array_key_exists('username', $config) ? $config['username'] : $this->username;
        $this->password = array_key_exists('password', $config) ? $config['password'] : $this->password;
    }