Allows a plugin to load container configuration.
502746
public function registerContainerConfiguration(LoaderInterface $loader, array $managerConfig)
    {
        $loader->load('@HeimrichHannotContaoUtilsBundle/Resources/config/services.yml');
        $loader->load('@HeimrichHannotContaoUtilsBundle/Resources/config/listener.yml');
        $loader->load('@HeimrichHannotContaoUtilsBundle/Resources/config/parameters.yml');
        $loader->load('@HeimrichHannotContaoUtilsBundle/Resources/config/utils.yml');
    }
1363882
function loadConfigAndGenerateSite(useServer, port) {
  var config = loadConfig();
  if (port) config.port = port;
  generateSite(config, useServer);
}
849944
public void load() {
        PluginDefinition definition = getDefinition();

        if (!initialized && definition != null) {
            BaseComponent top;

            try {
                initialized = true;
                top = container.getFirstChild();

                if (top == null) {
                    top = PageUtil.createPage(definition.getUrl(), container).get(0);
                }
            } catch (Throwable e) {
                container.destroyChildren();
                throw createChainedException("Initialize", e, null);
            }

            if (pluginControllers != null) {
                for (Object controller : pluginControllers) {
                    top.wireController(controller);
                }
            }

            findListeners(container);
            executeAction(PluginAction.LOAD, true);
        }
    }
1126128
function loadRoles() {
  const roleConfigsPath = path.join(process.cwd(), plugin.config.rolesPath);

  // This event allows to inject code before loading all APIs
  return plugin.myrmex.fire('beforeRolesLoad')
  .then(() => {
    // Retrieve configuration path of all API specifications
    return fs.readdirAsync(roleConfigsPath);
  })
  .catch(e => {
    if (e.code === 'ENOENT' && path.basename(e.path) === 'roles') {
      return Promise.resolve([]);
    }
    return Promise.reject(e);
  })
  .then((roleConfigFiles) => {
    // Load all the role configurations
    const rolePromises = [];
    _.forEach(roleConfigFiles, (filename) => {
      const roleConfigPath = path.join(roleConfigsPath, filename);
      const roleName = path.parse(filename).name;
      rolePromises.push(loadRole(roleConfigPath, roleName));
    });
    return Promise.all(rolePromises);
  })
  .then((roles) => {
    // This event allows to inject code to add or delete or alter role configurations
    return plugin.myrmex.fire('afterRolesLoad', roles);
  })
  .spread((roles) => {
    return Promise.resolve(roles);
  });
}
236061
function loadConfig(config) {
  var options = normalizeOptions(config);

  if (config.options.plugins != null && !Array.isArray(config.options.plugins)) {
    throw new Error(".plugins should be an array, null, or undefined");
  }

  var plugins = (config.options.plugins || []).map(function (plugin, index) {
    var _normalizePair = normalizePair(plugin, _files.loadPlugin, config.dirname),
        filepath = _normalizePair.filepath,
        value = _normalizePair.value,
        options = _normalizePair.options;

    return {
      alias: filepath || config.loc + "$" + index,
      loc: filepath || config.loc,
      value: value,
      options: options,
      dirname: config.dirname
    };
  });

  if (config.options.presets != null && !Array.isArray(config.options.presets)) {
    throw new Error(".presets should be an array, null, or undefined");
  }

  var presets = (config.options.presets || []).map(function (preset, index) {
    var _normalizePair2 = normalizePair(preset, _files.loadPreset, config.dirname),
        filepath = _normalizePair2.filepath,
        value = _normalizePair2.value,
        options = _normalizePair2.options;

    return {
      alias: filepath || config.loc + "$" + index,
      loc: filepath || config.loc,
      value: value,
      options: options,
      dirname: config.dirname
    };
  });

  return { options: options, plugins: plugins, presets: presets };
}
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
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']);
				}
			}
		}
	}
874656
function configure(context, file, fileSet, next) {
  var config = context.configuration
  var processor = context.processor

  if (stats(file).fatal) {
    return next()
  }

  config.load(file.path, handleConfiguration)

  function handleConfiguration(error, configuration) {
    var plugins
    var options
    var plugin
    var length
    var index
    var name

    if (error) {
      return next(error)
    }

    /* Store configuration on the context object. */
    debug('Using settings `%j`', configuration.settings)
    processor.data('settings', configuration.settings)

    plugins = configuration.plugins
    length = plugins.length
    index = -1

    debug('Using `%d` plugins', length)

    while (++index < length) {
      plugin = plugins[index][0]
      options = plugins[index][1]

      if (options === false) {
        continue
      }

      /* Allow for default arguments in es2020. */
      if (options === null || (object(options) && empty(options))) {
        options = undefined
      }

      name = fnName(plugin) || 'function'
      debug('Using plug-in `%s`, with options `%j`', name, options)

      try {
        processor.use(plugin, options, fileSet)
      } catch (error2) {
        /* istanbul ignore next - Shouldn’t happen anymore! */
        return next(error2)
      }
    }

    next()
  }
}
82779
public static function Initialize()
    {
        // Initialize the plugin loader and try to load any plugins.
        self::$plugin_loader = new Plugins\Loader();

        if(self::ValidExtension())
        {
            self::$plugin_loader->Start(self::GetCwd() . "/plugins");
            
            if(file_exists(self::GetCwd() . "/peg.conf"))
            {
                Settings::SetBackEnd(new Config\INI);
                Settings::Load(self::GetCwd(), "peg.conf");
            }
            else
            {
                Settings::SetBackEnd(new Config\JSON);
                Settings::Load(self::GetCwd(), "peg.json");
            }
        }
    }
191253
public function loadConfiguration(): void
	{
		$config = $this->validateConfig($this->defaults, $this->config);

		foreach ($config as $bridge => $enabled) {
			// Don't register sub extension
			if ($enabled === false) {
				continue;
			}

			// Security check
			Validators::assertField($config, $bridge, 'array');

			// Register sub extension a.k.a CompilerPass
			$this->passes[$bridge] = new $this->map[$bridge]();
			$this->passes[$bridge]->setCompiler($this->compiler, $this->prefix($bridge));
			$this->passes[$bridge]->setConfig($this->config[$bridge] ?? []);
			$this->passes[$bridge]->loadConfiguration();
		}
	}
1278340
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults);
		$config = Helpers::expand($config, $builder->parameters);

		// Scheduler
		$scheduler = $builder->addDefinition($this->prefix('scheduler'))
			->setFactory(LockingScheduler::class, [$config['path']]);

		// Commands
		$builder->addDefinition($this->prefix('runCommand'))
			->setFactory(RunCommand::class)
			->setAutowired(false);
		$builder->addDefinition($this->prefix('listCommand'))
			->setFactory(ListCommand::class)
			->setAutowired(false);
		$builder->addDefinition($this->prefix('helpCommand'))
			->setFactory(HelpCommand::class)
			->setAutowired(false);

		// Jobs
		foreach ($config['jobs'] as $key => $job) {
			if (is_array($job)) {
				$job = new Statement(CallbackJob::class, [$job['cron'], $job['callback']]);
			} else {
				$job = new Statement($job);
			}

			$scheduler->addSetup('add', [$job, $key]);
		}
	}
1217397
def load_configuration(configuration):
    """"""
    if isinstance(configuration, dict):
        return configuration
    else:
        with open(configuration) as configfile:
            return json.load(configfile)
697781
public static function setup()
    {
        if (static::$setup === false) {
            try {
                static::create_container();
                static::init_config();
                static::init_routing();
                static::init_services();
                static::add_wordpress_globals();

                // Run the loader.
                $loader = new Loader();
                $loader->boot();

                static::register_providers();
                static::init_templating();

                static::init_view();

                $classmap = null;
                $classmap_cache = \get_stylesheet_directory() . '/cache/config/' . \sha1(NONCE_SALT . 'classmap');

                if (WP_DEBUG === false && \file_exists($classmap_cache)) {
                    $classmap = \file_get_contents($classmap_cache);
                }

                $loader->load_theme($classmap);
            } catch (Exception $e) {
                throw new Startup_Exception($e->getMessage());
            }
        }

        static::$setup = true;
    }
169991
def load_base(namespace, plugin_type, provider, options = {})
    logger.info("Fetching plugin #{namespace} #{plugin_type} provider #{provider} at #{Time.now}")

    type_info  = loaded_plugin(namespace, plugin_type, provider)
    options    = translate_type(type_info, options)
    config     = Config.ensure(options)

    provider   = config.get(:provider, provider)
    name       = config.get(:name, nil)
    ensure_new = config.get(:new, false)

    if name
      logger.debug("Looking up existing instance of #{name}")

      if existing_instance = get(namespace, plugin_type, name)
        unless ensure_new
          config.delete(:new)

          config.export.each do |property_name, value|
            unless [ :name, :meta ].include?(property_name)
              existing_instance[property_name] = value
            end
          end
          existing_instance.normalize(true)

          logger.debug("Using existing instance of #{plugin_type}, #{name}")
          return existing_instance
        end
      end
    end
    create(namespace, plugin_type, provider, config)
  end
1022388
private function loadConfigFiles(ContainerBuilder $container): void
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__ . '/../Resources/config')
        );

        $loader->load('default_settings.yml');
        $loader->load('services/errors.yml');
        $loader->load('services/view/providers.yml');
        $loader->load('services/view/matchers.yml');
        $loader->load('services/view/view.yml');

        $loader->load('services/items.yml');
        $loader->load('services/block_definitions.yml');
        $loader->load('services/config_definitions.yml');
        $loader->load('services/forms.yml');
        $loader->load('services/context.yml');
        $loader->load('services/commands.yml');
        $loader->load('services/design.yml');
        $loader->load('services/security.yml');
        $loader->load('services/utils.yml');

        $loader->load('services/layout_resolver/layout_resolver.yml');
        $loader->load('services/layout_resolver/condition_types.yml');
        $loader->load('services/layout_resolver/target_handlers.yml');
        $loader->load('services/layout_resolver/target_types.yml');
        $loader->load('services/layout_resolver/forms.yml');

        $loader->load('browser/services.yml');
        $loader->load('services/layouts.yml');
        $loader->load('services/collections.yml');
        $loader->load('services/param_converters.yml');
        $loader->load('services/event_listeners.yml');

        $loader->load('services/configuration.yml');
        $loader->load('services/controllers.yml');
        $loader->load('services/normalizers.yml');
        $loader->load('services/validators.yml');
        $loader->load('services/templating.yml');
        $loader->load('services/parameters.yml');
        $loader->load('services/http_cache.yml');
        $loader->load('services/locale.yml');

        $loader->load('services/transfer/serialization_visitors.yml');
        $loader->load('services/transfer/services.yml');

        $loader->load('services/api.yml');
    }
1110620
def configuration(self, plugin):
        
        conf = self.config.get(plugin, "default;").split(';')
        if len(conf) == 1:
            conf.append('')
        return tuple(conf)
941111
def start_plugin(file_path=None):
    """"""
    if os.getenv('CONFIG_PATH'):
        file_path = os.getenv('CONFIG_PATH')
    else:
        file_path = file_path
    if file_path is not None:
        config = parse_config(file_path)
        plugin_instance = load_plugin(config)
    else:
        plugin_instance = load_plugin
    return plugin_instance