HOOK: used after configuration is loaded

@throws ModuleConfigException
974575
public function _initialize()
    {
        $this->bootstrapFile = Configuration::projectDir() . $this->config['bootstrap'];

        if (!file_exists($this->bootstrapFile)) {
            throw new ModuleConfigException(
                __CLASS__,
                "Bootstrap file does not exist in " . $this->config['bootstrap'] . "\n"
                . "Please create the bootstrap file that returns Application object\n"
                . "And specify path to it with 'bootstrap' config\n\n"
                . "Sample bootstrap: \n\n<?php\n"
                . '$config = include __DIR__ . "/config.php";' . "\n"
                . 'include __DIR__ . "/loader.php";' . "\n"
                . '$di = new \Phalcon\DI\FactoryDefault();' . "\n"
                . 'include __DIR__ . "/services.php";' . "\n"
                . 'return new \Phalcon\Mvc\Application($di);'
            );
        }

        $this->client = new PhalconConnector();
    }
338398
function(config) {
        _cleanup();

        if (!config) config = {};

        _global = config.global || {};
        _partners = config.partners || {};

        if (!_loaded) _loaded = true;
        this.trigger('dynamicConfigChanged');
      }
901200
private function initializeOnDemand()
    {
        if ($this->initialized === false) {
            $this->arrayConfig->setData($this->configMapper->fetchAll());
            $this->initialized = true;
        }
    }
986950
private void init() throws ConfigFileIOException {
        this.props = new Properties();
        log.info("Reading config file: {}", this.configFile);
        boolean ok = true;
        try {
            // El fichero esta en el CLASSPATH
            this.props.load(SystemConfig.class.getResourceAsStream(this.configFile));
        } catch (Exception e) {
            log.warn("File not found in the Classpath");
            try {
                this.props.load(new FileInputStream(this.configFile));
            } catch (IOException ioe) {
                log.error("Can't open file: {}", ioe.getLocalizedMessage());
                ok = false;
                ioe.printStackTrace();
                throw new ConfigFileIOException(ioe.getLocalizedMessage());
            }
        }
        if (ok) {
            log.info("Configuration loaded successfully");
            if (log.isDebugEnabled()) {
                log.debug(this.toString());
            }
        }
    }
570902
protected function initConfig()
    {
        if (isset($this->settings) || $this->settings->exists('config')) {
            $this->config->setDefinition($this->settings->get('config'));
        }
    }
1234862
protected function scanLoadConfig(): void
    {
        /* @var SplFileInfo $directory */
        /* @var SplFileInfo $file */
        foreach (Finder::create()->directories()->depth(1)->name('Config')->in($this->modulePath()) as $directory) {
            foreach (Finder::create()->files()->name('*.php')->in($directory->getPathname()) as $file) {
                $this->mergeConfigFrom($file->getPathname(), Str::snake($directory->getRelativePath()));
            }
        }
    }
537325
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();

		$builder->getDefinition($this->extensionPrefix('core.dispatcher'))
			->setType(DecoratedDispatcher::class)
			->setFactory(DecoratedDispatcher::class);

		$builder->addDefinition($this->prefix('decorator.manager'))
			->setFactory(DecoratorManager::class);
	}
712441
protected function _init() {
		if (!$this->_config['host']) {
			throw new ConfigException('No host configured.');
		}

		if (HostString::isSocket($this->_config['host'])) {
			$this->_config['dsn'] = sprintf(
				'mysql:unix_socket=%s;dbname=%s',
				$this->_config['host'],
				$this->_config['database']
			);
		} else {
			$host = HostString::parse($this->_config['host']) + [
				'host' => static::DEFAULT_HOST,
				'port' => static::DEFAULT_PORT
			];
			$this->_config['dsn'] = sprintf(
				'mysql:host=%s;port=%s;dbname=%s',
				$host['host'],
				$host['port'],
				$this->_config['database']
			);
		}
		parent::_init();

		$this->_operators += [
			'REGEXP' => [],
			'NOT REGEXP' => [],
			'SOUNDS LIKE' => []
		];
	}
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);
        }
    }
1272191
public function init()
    {
        if ($this->attribute === null) {
            throw new InvalidConfigException('Please specify the "attribute" property.');
        }

        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getMdeditorId();
        }
    }
106715
@Override
    public void initModule() throws ModuleInitializationException {

        String dsMediation = getParameter("doMediateDatastreams");
        if (dsMediation == null) {
            throw new ModuleInitializationException("doMediateDatastreams parameter must be specified.",
                                                    getRole());
        }
    }
649491
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		$builder->addDefinition($this->prefix('entityAdapter'))
			->setFactory(EntityAdapter::class);

		$entityDefinition = $builder->addDefinition($this->prefix('entityDefinition'))
			->setFactory(EntityDefinition::class);

		$coreDefinition = $builder->addDefinition($this->prefix('coreDefinition'))
			->setFactory(CoreDefinition::class);

		$schemaBuilder = $builder->addDefinition($this->prefix('schemaBuilder'))
			->setFactory(SchemaBuilder::class);

		if ($config['definitions'] === null) {
			$schemaBuilder
				->addSetup('addDefinition', [new BaseDefinition()])
				->addSetup('addDefinition', [$entityDefinition])
				->addSetup('addDefinition', [$coreDefinition]);
			foreach ($config['files'] as $file) {
				if (Strings::endsWith($file, '.neon')) {
					$schemaBuilder->addSetup('addDefinition', [new NeonDefinition($file)]);
				} elseif (Strings::endsWith($file, '.yaml') || Strings::endsWith($file, '.yml')) {
					$schemaBuilder->addSetup('addDefinition', [new YamlDefinition($file)]);
				} elseif (Strings::endsWith($file, '.json')) {
					$schemaBuilder->addSetup('addDefinition', [new JsonDefinition($file)]);
				} else {
					throw new InvalidArgumentException(sprintf(
						'We cant parse file "%s" - unsupported file type',
						$file
					));
				}
			}

			$schemaBuilder->addSetup('addDefinition', [new ArrayDefinition($config['definition'])]);
		} else {
			foreach ($config['definitions'] as $customDefinition) {
				$schemaBuilder->addSetup('addDefinition', [$customDefinition]);
			}
		}

		if ($global['debug'] !== true) {
			return;
		}

		if ($config['swaggerUi']['panel']) {
			$builder->addDefinition($this->prefix('swaggerUi.panel'))
				->setFactory(SwaggerUIPanel::class)
				->addSetup('setUrl', [$config['swaggerUi']['url']])
				->addSetup('setExpansion', [$config['swaggerUi']['expansion']])
				->addSetup('setFilter', [$config['swaggerUi']['filter']])
				->addSetup('setTitle', [$config['swaggerUi']['title']])
				->setAutowired(false);
		}
	}
605765
protected function initialize()
    {
        // Sanity check; must be on (or after) `plugins_loaded` hook.
        // If uninstalling, must be on (or after) `init` hook.

        if (!did_action('plugins_loaded')) {
            throw new Exception('`plugins_loaded` action not done yet.');
        } elseif ($this->Config->§uninstall && !did_action('init')) {
            throw new Exception('`init` action not done yet.');
        }
        // Check for any known conflicts.

        if ($this->s::conflictsExist()) {
            return; // Stop here.
        }
        // Check for any unsatisfied dependencies.

        if ($this->s::dependenciesUnsatisfied()) {
            return; // Stop here.
        }
        // Add app instance to collection.

        if ($this->Parent && $this->Parent->is_core && !$this->Config->§uninstall) {
            $this->Parent->s::addApp($this);
        }
        // Remaining routines are driven by setup hook.

        if ($this->Config->§uninstall || did_action($this->Config->§setup['§hook'])) {
            $this->onSetup(); // Run setup immediately.
        } else { // Delay setup routines; i.e., attach to hook.
            add_action($this->Config->§setup['§hook'], [$this, 'onSetup'], $this->Config->§setup['§hook_priority']);
        }
    }
608435
public function loadConfig()
    {
        $fileName = File::path(dirname($this->getPath()), 'config/config.php');
        if(is_file($fileName))
        {
            Config::addConfig('@' . $this->moduleName, include $fileName);
        }
    }
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'],
			]);
	}
860198
def _run_hooks(self, name, module):
        
        hooks = self.post_load_hooks.pop(name, [])

        for hook in hooks:
            hook(module)
1368354
def on_config(self, config):
        ""
        #print("Here is the config:", config)

        # fetch variables from YAML file:
        self._variables = config.get(YAML_SUBSET)

        # add variables and functions from the module:
        module_reader.load_variables(self._variables, config)

        print("Variables:", self.variables)