Parses @config setting up @self state.
434389
def parse_config(self, config, toplevel=False):
        """"""
        self.sitemap_path = config.get_path('sitemap')

        if self.sitemap_path is None:
            error('invalid-config',
                  'No sitemap was provided')

        self.include_paths = OrderedSet([])

        index_file = config.get_index()
        if index_file:
            if not os.path.exists(index_file):
                error('invalid-config',
                      'The provided index "%s" does not exist' %
                      index_file)
            self.include_paths |= OrderedSet([os.path.dirname(index_file)])

        self.include_paths |= OrderedSet(config.get_paths('include_paths'))

        self.is_toplevel = toplevel

        self.tree = Tree(self, self.app)

        self.__create_extensions()

        for extension in list(self.extensions.values()):
            if toplevel:
                extension.parse_toplevel_config(config)
            extension.parse_config(config)

        self.extra_asset_folders = OrderedSet(config.get_paths('extra_assets'))
246846
def parse_config(config)
      sections = {"defaults" => []}
      current  = "defaults"
      config.gsub(/#[^\n]*/, "")
        .split(/\n/)
        .map(&:strip)
        .reject(&:empty?)
        .each do |line|
        if IS_SECTION =~ line
          current = line.match(IS_SECTION)[1].strip
          sections[current] ||= []
        else
          sections[current] << line
        end
      end
      sections
    end
811489
def config
      @config ||= begin
        Hash.new do |hash, key|
          raise ConfigurationError, "Configuration key #{key} in task #{name} doesn't exist"
        end.tap do |hash|
          hash.define_singleton_method(:declare) do |*keys|
            keys.each { |key| self[key] = nil unless self.has_key?(key) }
          end
        end
      end
    end
581239
protected function initConfig(): void
    {
        $configFile = $this->getRootRelatedPath($this->getConfigFileName());

        $this->assertFileIsReadable($configFile);

        self::$config = (array)(include $configFile);
    }
246767
function init(msg, done) {
  var config = {
    context: opts.context,
    adapter: opts.adapter,
    routes: opts.routes,
    auth: opts.auth,
    options: opts.options
  }

  setServer.call(this, config, done)
}
1063058
function Parser(config) {
  if (!(this instanceof Parser)) return new Parser(config);

  this.config = config;

  this.config.on('read', function read(type) {
    this[type]();
  }.bind(this));
}
48589
def setup
      return Squire::Settings.new unless @source

      parser = Squire::Parser.of(@type)

      hash = parser.parse(source).with_indifferent_access

      if base_namespace
        hash.except(base_namespace).each do |key, values|
          # favours value from namespace over value from defaults
          hash[key] = hash[base_namespace].deep_merge(values) { |_, default, value| value.nil? ? default : value }
        end
      end

      Squire::Settings.from_hash(hash)
    end
309645
protected function _init() {
		parent::_init();
		$config =& $this->_config;

		if (!$config['to']) {
			$assoc = preg_replace("/\\w+$/", "", $config['from']) . $config['name'];
			$config['to'] = Libraries::locate('models', $assoc);
		} elseif (!strpos($config['to'], '\\')) {
			$config['to'] = preg_replace("/\\w+$/", "", $config['from']) . $config['to'];
		}

		if (!$config['key'] || !is_array($config['key'])) {
			$config['key'] = $this->_keys($config['key']);
		}
		if ($config['strategy']) {
			$config = (array) $config['strategy']($this) + $config;
			unset($this->_config['strategy']);
		}
	}
963440
def parsed(self):
        
        if not self._parsed:

            self._parsed = ConfigParser()
            self._parsed.readfp(io.StringIO(self.content))

        return self._parsed
1369097
def parse(self):
        
        self._options, self._arguments = self._parse_args()
        self._arguments = self._arguments or ['.']

        if not self._validate_options(self._options):
            raise IllegalConfiguration()

        self._run_conf = self._create_run_config(self._options)

        config = self._create_check_config(self._options, use_defaults=False)
        self._override_by_cli = config
967745
private void parseConfiguration(String configuration) {

        Map<String, String> configOptions = CmsWidgetUtil.parsePipeSeparatedConfigString(configuration);
        if (!configOptions.isEmpty()) {
            m_category = CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_CATEGORY, m_category);
            m_isSingleValue = !("multi".equals(
                CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_SELECTIONTYPE, "single")));
            m_children = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_PARENTSELECTION);
            m_collapsed = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_COLLAPSED);
            m_showWithRepository = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_SHOW_WITH_REPOSITORY);
            m_refPath = CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_REFPATH, m_refPath);
        }
    }
1336541
public void configure() {
	  if (configurator != null && !underConfiguration.get() &&
			  underConfiguration.compareAndSet(false, true)) {
		 try {
			  configurator.configure(this);
		 } finally {
			 underConfiguration.set(false);
		 }
	  }
  }
1036635
function Config(options, StateMachine) {

  options = options || {};

  this.options     = options; // preserving original options can be useful (e.g visualize plugin)
  this.defaults    = StateMachine.defaults;
  this.states      = [];
  this.transitions = [];
  this.map         = {};
  this.lifecycle   = this.configureLifecycle();
  this.init        = this.configureInitTransition(options.init);
  this.data        = this.configureData(options.data);
  this.methods     = this.configureMethods(options.methods);

  this.map[this.defaults.wildcard] = {};

  this.configureTransitions(options.transitions || []);

  this.plugins = this.configurePlugins(options.plugins, StateMachine.plugin);

}
39718
def setup_config(command, filename, section, vars):
    """"""
    confuri = "config:" + filename
    if ":" in section:
        confuri += "#" + section.rsplit(":", 1)[-1]
    conf = appconfig(confuri)

    load_environment(conf.global_conf, conf.local_conf)
1306302
protected function setupParse()
    {
        $config = $this->app->config->get('parse');

        ParseClient::initialize($config['app_id'], $config['rest_key'], $config['master_key']);

        if (isset($config['server_url']) && isset($config['mount_path'])) {
            $serverURL = rtrim($config['server_url'], '/');
            $mountPath = trim($config['mount_path'], '/').'/';

            ParseClient::setServerURL($serverURL, $mountPath);
        }

        if (isset($config['session']) && $config['session'] === 'laravel') {
            ParseClient::setStorage(new ParseSessionStorage($this->app->session));
        }
    }
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)
836515
private void initializeConfig() {
    this.varDecay = this.config.varDecay;
    this.varInc = this.config.varInc;
    this.ccminMode = this.config.clauseMin;
    this.restartFirst = this.config.restartFirst;
    this.restartInc = this.config.restartInc;
    this.clauseDecay = this.config.clauseDecay;
    this.removeSatisfied = this.config.removeSatisfied;
    this.learntsizeFactor = this.config.learntsizeFactor;
    this.learntsizeInc = this.config.learntsizeInc;
    this.incremental = this.config.incremental;
  }