Makes sure config is loaded and cached.
@return void
767983
protected function load_config() {
        if (!isset($this->config)) {
            $name = $this->get_name();
            $this->config = get_config("enrol_$name");
        }
    }
119951
protected function loadConfig()
    {
        $config = new Config(
            \Hail\Facade\Config::get('migrate')
        );

        $this->setConfig($config);
    }
1289430
public function loadConfigurationCache(): bool
    {
        $cachePathAndFilename = $this->constructConfigurationCachePath();
        $configurations = @include $cachePathAndFilename;
        if ($configurations !== false) {
            $this->configurations = $configurations;
            return true;
        }

        return false;
    }
9971
private function init()
    {
        foreach ($this->configs as $webmaster => $content) {
            $this->add($webmaster, $content);
        }
    }
782398
private function loadUsersSettings()
    {
        if (null !== $this->usersSettings) {
            return;
        }

        $this->usersSettings = array_replace(
            self::$defaultUserSettings,
            // removes undefined keys in default settings
            array_intersect_key(
                $this->conf->get(['user-settings'], []),
                self::$defaultUserSettings
            )
        );
    }
1305227
public function loadConfig()
    {
        if (!$this->registry->isRedirect()) {
            $storeId = $this->sgCoreConfig->getStoreId($this->getShopNumber());
            $this->storeManager->setCurrentStore($storeId);
        }
        $this->loadArray($this->toArray());
        $this->setExportTmpAndLogSettings();
    }
1306382
private function onConfigLoaded()
    {
        $this->log('controller config loaded/updated');
        $this->stopPlugins();
        if (!$this->state['config']['enabled']) {
            $this->log('controller disabled');
            return;
        }

        foreach ($this->state['config']['plugins'] as $pluginId => $config) {
            if (!$config['enabled']) {
                continue;
            }

            $this->log('loading plugin '.$pluginId);

            foreach ($this->registeredPlugins as $className) {
                if ($className::getPluginId() == $pluginId) {
                    $plugin = new $className($this);
                    $this->plugins[] = $plugin;
                    $plugin->init();
                    continue 2;
                }
            }

            $this->log("plugin ${pluginId} is not registered with the controller");
        }
    }
1281383
protected function loadCache()
    {
        if (file_exists($this->cacheFile)) {
            $this->routes = require $this->cacheFile;
            $this->cacheLoaded = true;
            return true;
        }

        return false;
    }
337262
protected function loadConfig(): void
    {
        $configClass = $this->getConfigClass();
        $configDefinitionClass = $this->getConfigDefinitionClass();
        try {
            $this->config = new $configClass(
                $this->getRawConfig(),
                new $configDefinitionClass()
            );
        } catch (InvalidConfigurationException $e) {
            throw new UserException($e->getMessage(), 0, $e);
        }
    }
615849
private function loadConfig()
    {
        $this->_config = new Configuration();
        $this->_config->from('app');

        // let's go ahead and set timezone
        date_default_timezone_set($this->_config->get('timezone'));
    }
584125
protected function configure()
    {
        $this->setName('clear-cache')
        ->setDescription('Clears the cache');

        $c = new Configuration();
        $this->_config = $c->from('app');
    }
294087
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults);
		$config = Helpers::expand($config, $builder->parameters);

		$annotations = $builder->addDefinition($this->prefix('annotations'))
			->setType(AnnotationReader::class)
			->setAutowired(false);

		foreach ($config['ignore'] as $name) {
			$annotations->addSetup('addGlobalIgnoredName', [$name]);
		}

		$cache = $builder->addDefinition($this->prefix('cache'))
			->setAutowired(false);

		if ($config['cache'] === self::CACHE_AUTO) {
			if (extension_loaded('apcu')) {
				$cache->setType(ApcuCache::class);
			} else {
				$cache->setType(PhpFileCache::class)
					->setArguments([$config['temp']]);
			}
		} else {
			Compiler::loadDefinition($cache, $config['cache']);
		}

		$builder->addDefinition($this->prefix('reader'))
			->setType(Reader::class)
			->setFactory(CachedReader::class, [
				'@' . $this->prefix('annotations'),
				'@' . $this->prefix('cache'),
				$config['debug'],
			]);
	}
539233
protected function checkCaching()
    {
        if (app()->routesAreCached() && app()->configurationIsCached()) {
            $this->info('p.s. you need to run "config:cache" + "route:cache" + "queue:restart" to ensure your application updates and queue monitoring works correctly.');
        } elseif (app()->configurationIsCached()) {
            $this->info('p.s. you need to run "config:cache" + "queue:restart" to ensure your application updates and queue monitoring works correctly.');
        } elseif (app()->routesAreCached()) {
            $this->info('p.s. you need to run "route:cache" + "queue:restart" to ensure your application updates and queue monitoring works correctly.');
        } else {
            $this->info('p.s. you need to run "queue:restart" to ensure your queue monitoring works correctly.');
        }

        $this->info(' ');
    }
872893
public function isConfigured()
    {
        Logger::log('Checking configuration');
        $configured = (count($this->config) > 0);
        if ($configured) {
            foreach (static::$required as $required) {
                if (!array_key_exists($required, $this->config)) {
                    $configured = false;
                    break;
                }
            }
        }
        return $configured || $this->checkTryToSaveConfig() || self::isTest();
    }
923438
private function loadConfiguration()
    {
        $allFiles = File::allFiles('_automate');

        foreach ( $allFiles as $file )
            if( strpos((string)$file, '.done') === false )
                $this->configurationData[] = $this->optimizeData($file);

    }
956153
protected function initConfig(): void
    {
        $loader = new ConfigLoader();
        $loader->setPath($this->getPath());
        $loader->setEnvironment($this->getEnvironment());
        $loader->load();

        $config = new \Bluz\Config\Config();
        $config->setFromArray($loader->getConfig());

        Config::setInstance($config);

        // setup configuration for current environment
        if ($debug = Config::get('debug')) {
            $this->debugFlag = (bool)$debug;
        }

        // initial php settings
        if ($ini = Config::get('php')) {
            foreach ($ini as $key => $value) {
                $result = ini_set($key, $value);
                Logger::info('app:init:php:' . $key . ':' . ($result ?: '---'));
            }
        }
    }
516039
public function loadDoctrineConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults['configuration'], $this->config['configuration']);

		$logger = $builder->addDefinition($this->prefix('logger'))
			->setType(LoggerChain::class)
			->setAutowired('self');

		$configuration = $builder->addDefinition($this->prefix('configuration'));
		$configuration->setFactory(Configuration::class)
			->setAutowired(false)
			->addSetup('setSQLLogger', [$this->prefix('@logger')]);

		// SqlLogger (append to chain)
		if ($config['sqlLogger'] !== null) {
			$logger->addSetup('addLogger', [$config['sqlLogger']]);
		}

		// ResultCacheImpl
		if ($config['resultCacheImpl'] !== null) {
			$configuration->addSetup('setResultCacheImpl', [$config['resultCacheImpl']]);
		}

		// FilterSchemaAssetsExpression
		if ($config['filterSchemaAssetsExpression'] !== null) {
			$configuration->addSetup('setFilterSchemaAssetsExpression', [$config['filterSchemaAssetsExpression']]);
		}

		// AutoCommit
		Validators::assert($config['autoCommit'], 'bool', 'configuration.autoCommit');
		$configuration->addSetup('setAutoCommit', [$config['autoCommit']]);
	}