utility method to load in a config value
@see /protos/common/configtx.proto
@see /protos/msp/mspconfig.proto
@see /protos/orderer/configuration.proto
@see /protos/peer/configuration.proto
355274
function loadConfigValue(config_items, versions, config_value, group_name, org, isOrderer) {
	logger.debug('loadConfigValue - %s -  value name: %s', group_name, config_value.key);
	logger.debug('loadConfigValue - %s    - version: %s', group_name, config_value.value.version);
	logger.debug('loadConfigValue - %s    - mod_policy: %s', group_name, config_value.value.mod_policy);

	versions.version = config_value.value.version;
	try {
		switch (config_value.key) {
			case 'AnchorPeers': {
				const anchor_peers = _peerConfigurationProto.AnchorPeers.decode(config_value.value.value);
				logger.debug('loadConfigValue - %s    - AnchorPeers :: %s', group_name, anchor_peers);
				if (anchor_peers && anchor_peers.anchor_peers) {
					for (const i in anchor_peers.anchor_peers) {
						const anchor_peer = {
							host: anchor_peers.anchor_peers[i].host,
							port: anchor_peers.anchor_peers[i].port,
							org: org
						};
						config_items['anchor-peers'].push(anchor_peer);
						logger.debug('loadConfigValue - %s    - AnchorPeer :: %s:%s:%s', group_name, anchor_peer.host, anchor_peer.port, anchor_peer.org);
					}
				}
				break;
			}
			case 'MSP': {
				const msp_value = _mspConfigProto.MSPConfig.decode(config_value.value.value);
				logger.debug('loadConfigValue - %s    - MSP found', group_name);
				if (!isOrderer) {
					config_items.msps.push(msp_value);
				}
				break;
			}
			case 'ConsensusType': {
				const consensus_type = _ordererConfigurationProto.ConsensusType.decode(config_value.value.value);
				config_items.settings.ConsensusType = consensus_type;
				logger.debug('loadConfigValue - %s    - Consensus type value :: %s', group_name, consensus_type.type);
				break;
			}
			case 'BatchSize': {
				const batch_size = _ordererConfigurationProto.BatchSize.decode(config_value.value.value);
				config_items.settings.BatchSize = batch_size;
				logger.debug('loadConfigValue - %s    - BatchSize  max_message_count :: %s', group_name, batch_size.maxMessageCount);
				logger.debug('loadConfigValue - %s    - BatchSize  absolute_max_bytes :: %s', group_name, batch_size.absoluteMaxBytes);
				logger.debug('loadConfigValue - %s    - BatchSize  preferred_max_bytes :: %s', group_name, batch_size.preferredMaxBytes);
				break;
			}
			case 'BatchTimeout': {
				const batch_timeout = _ordererConfigurationProto.BatchTimeout.decode(config_value.value.value);
				config_items.settings.BatchTimeout = batch_timeout;
				logger.debug('loadConfigValue - %s    - BatchTimeout timeout value :: %s', group_name, batch_timeout.timeout);
				break;
			}
			case 'ChannelRestrictions': {
				const channel_restrictions = _ordererConfigurationProto.ChannelRestrictions.decode(config_value.value.value);
				config_items.settings.ChannelRestrictions = channel_restrictions;
				logger.debug('loadConfigValue - %s    - ChannelRestrictions max_count value :: %s', group_name, channel_restrictions.max_count);
				break;
			}
			case 'ChannelCreationPolicy': {
				const creation_policy = _policiesProto.Policy.decode(config_value.value.value);
				loadPolicy(config_items, versions, config_value.key, creation_policy, group_name, org);
				break;
			}
			case 'HashingAlgorithm': {
				const hashing_algorithm_name = _commonConfigurationProto.HashingAlgorithm.decode(config_value.value.value);
				config_items.settings.HashingAlgorithm = hashing_algorithm_name;
				logger.debug('loadConfigValue - %s    - HashingAlgorithm name value :: %s', group_name, hashing_algorithm_name.name);
				break;
			}
			case 'Consortium': {
				const consortium_algorithm_name = _commonConfigurationProto.Consortium.decode(config_value.value.value);
				config_items.settings.Consortium = consortium_algorithm_name;
				logger.debug('loadConfigValue - %s    - Consortium name value :: %s', group_name, consortium_algorithm_name.name);
				break;
			}
			case 'BlockDataHashingStructure': {
				const blockdata_hashing_structure = _commonConfigurationProto.BlockDataHashingStructure.decode(config_value.value.value);
				config_items.settings.BlockDataHashingStructure = blockdata_hashing_structure;
				logger.debug('loadConfigValue - %s    - BlockDataHashingStructure width value :: %s', group_name, blockdata_hashing_structure.width);
				break;
			}
			case 'OrdererAddresses': {
				const orderer_addresses = _commonConfigurationProto.OrdererAddresses.decode(config_value.value.value);
				logger.debug('loadConfigValue - %s    - OrdererAddresses addresses value :: %s', group_name, orderer_addresses.addresses);
				if (orderer_addresses && orderer_addresses.addresses) {
					for (const address of orderer_addresses.addresses) {
						config_items.orderers.push(address);
					}
				}
				break;
			}
			case 'KafkaBrokers': {
				const kafka_brokers = _ordererConfigurationProto.KafkaBrokers.decode(config_value.value.value);
				logger.debug('loadConfigValue - %s    - KafkaBrokers addresses value :: %s', group_name, kafka_brokers.brokers);
				if (kafka_brokers && kafka_brokers.brokers) {
					for (const broker of kafka_brokers.brokers) {
						config_items['kafka-brokers'].push(broker);
					}
				}
				break;
			}
			default:
				logger.debug('loadConfigValue - %s    - value: %s', group_name, config_value.value.value);
		}
	} catch (err) {
		logger.debug('loadConfigValue - %s - name: %s - *** unable to parse with error :: %s', group_name, config_value.key, err);
	}
}
1305227
public function loadConfig()
    {
        if (!$this->registry->isRedirect()) {
            $storeId = $this->sgCoreConfig->getStoreId($this->getShopNumber());
            $this->storeManager->setCurrentStore($storeId);
        }
        $this->loadArray($this->toArray());
        $this->setExportTmpAndLogSettings();
    }
784052
def _load(self):
        """"""
        for attr_name, config_prop in self._iter_config_props():
            found = False
            for loader in self._loaders:
                if loader.exists(config_prop.property_key):
                    raw_value = loader.get(config_prop.property_key)
                    converted_value = config_prop.load(raw_value)

                    self._set_instance_prop(attr_name, config_prop, converted_value)
                    found = True
                    break

            if not found:
                if not config_prop.required or config_prop.default is not None:
                    self._set_instance_prop(attr_name, config_prop, config_prop.default)
                else:
                    raise ValueError('Missing required ConfigProperty {}'.format(attr_name))
1047698
public static Config loadConfig(ConfigParseOptions parseOptions,
            ConfigResolveOptions resolveOptions, URL configUrl) {
        return ConfigFactory.parseURL(configUrl, parseOptions).resolve(resolveOptions);
    }
751433
protected function loadConfig() {
		$app_root = Registry::getInstance()->app_root;
		if (file_exists($app_root . '/Application/config.php')) {
			require_once $app_root . '/Application/config.php';
		}

		if (file_exists($app_root . '/Application/localconfig.php')) {
			require_once $app_root . '/Application/localconfig.php';
		}

		if (isset($config)) {
			Registry::getInstance()->config = $config;
		} else {
			Registry::getInstance()->config = [];
		}
	}
991696
public Integer loadPreferenceAsInteger(String key, Integer defaultValue) {
		Integer value = defaultValue;
		if (hasPreference(key)) {
			value = getSharedPreferences().getInt(key, 0);
		}
		logLoad(key, value);
		return value;
	}
1001107
public ShardingConfiguration load() throws IOException {
        Collection<String> schemaNames = new HashSet<>();
        YamlProxyServerConfiguration serverConfig = loadServerConfiguration(new File(ShardingConfigurationLoader.class.getResource(CONFIG_PATH + SERVER_CONFIG_FILE).getFile()));
        File configPath = new File(ShardingConfigurationLoader.class.getResource(CONFIG_PATH).getFile());
        Collection<YamlProxyRuleConfiguration> ruleConfigurations = new LinkedList<>();
        for (File each : findRuleConfigurationFiles(configPath)) {
            Optional<YamlProxyRuleConfiguration> ruleConfig = loadRuleConfiguration(each, serverConfig);
            if (ruleConfig.isPresent()) {
                Preconditions.checkState(schemaNames.add(ruleConfig.get().getSchemaName()), "Schema name `%s` must unique at all rule configurations.", ruleConfig.get().getSchemaName());
                ruleConfigurations.add(ruleConfig.get());
            }
        }
        Preconditions.checkState(!ruleConfigurations.isEmpty() || null != serverConfig.getOrchestration(), "Can not find any sharding rule configuration file in path `%s`.", configPath.getPath());
        Map<String, YamlProxyRuleConfiguration> ruleConfigurationMap = new HashMap<>(ruleConfigurations.size(), 1);
        for (YamlProxyRuleConfiguration each : ruleConfigurations) {
            ruleConfigurationMap.put(each.getSchemaName(), each);
        }
        return new ShardingConfiguration(serverConfig, ruleConfigurationMap);
    }
561897
@Override
    protected synchronized void loadConfiguration() throws IOException {
        final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        final TypeReference<HashMap<String, String>> typeRef = new TypeReference<HashMap<String, String>>() {};
        namespaces = mapper.readValue(new File(configPath), typeRef);
    }
704782
private Configuration loadConfigurationFromMetadataBuffer(Buffer buffer) {
    if (buffer.position(12).readByte() == 1) {
      return new Configuration(
        buffer.readLong(),
        buffer.readLong(),
        buffer.readLong(),
        serializer.readObject(buffer)
      );
    }
    return null;
  }
1003284
public FSAConfiguration load(String fileInput) throws IOException {
        //todo: add support to load from properties file
        FSAConfiguration config = jsonMapper.readValue(new File(fileInput), FSAConfiguration.class);
        return config;
    }
823913
protected Scriptable loadConfig(String configScript) throws IOException {
		configScript = processConfig(configScript);
		Context cx = Context.enter();
		Scriptable config;
		try {
			sharedScope = cx.initStandardObjects(null, true);

			// set up options object
			IOptions options = aggregator.getOptions();
			if (options != null) {
				optionsUpdated(options, 1);
			}
			// set up init params object
			InitParams initParams = aggregator.getInitParams();
			if (initParams != null) {
				Scriptable jsInitParams = cx.newObject(sharedScope);
				Collection<String> names = initParams.getNames();
				for (String name : names) {
					Collection<String> values = initParams.getValues(name);
					Object value = Context.javaToJS(values.toArray(new String[values.size()]), sharedScope);
					ScriptableObject.putProperty(jsInitParams, name, value);
				}
				ScriptableObject.putProperty(sharedScope, "initParams", jsInitParams); //$NON-NLS-1$
			}

			// set up bundle manifest headers property
			if ( aggregator.getPlatformServices() != null) {
				if( aggregator.getPlatformServices().getHeaders() != null){
					Dictionary<String, String> headers = (Dictionary<String, String>)( aggregator.getPlatformServices().getHeaders());
					Scriptable jsHeaders = cx.newObject(sharedScope);
					Enumeration<String> keys = headers.keys();
					while (keys.hasMoreElements()) {
						String key = keys.nextElement();
						Object value = Context.javaToJS(headers.get(key), sharedScope);
						ScriptableObject.putProperty(jsHeaders, key, value);
					}
					ScriptableObject.putProperty(sharedScope, "headers", jsHeaders); //$NON-NLS-1$
				}
			}

			// set up console object
			Console console = newConsole();
			Object jsConsole = Context.javaToJS(console, sharedScope);
			ScriptableObject.putProperty(sharedScope, "console", jsConsole); //$NON-NLS-1$
			GetPropertyFunction getPropertyFn = newGetPropertyFunction(sharedScope, aggregator);
			ScriptableObject.putProperty(sharedScope, "getProperty", getPropertyFn); //$NON-NLS-1$

			// Call the registered scope modifiers
			callConfigScopeModifiers(sharedScope);

			cx.evaluateString(sharedScope, "var config = " +  //$NON-NLS-1$
					aggregator.substituteProps(configScript, new IAggregator.SubstitutionTransformer() {
						@Override
						public String transform(String name, String value) {
							// escape forward slashes for javascript literals
							return value.replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
						}
					}), getConfigUri().toString(), 1, null);
			config = (Scriptable)sharedScope.get("config", sharedScope); //$NON-NLS-1$
			if (config == Scriptable.NOT_FOUND) {
				throw new IllegalStateException("config is not defined."); //$NON-NLS-1$
			}
		} finally {
			Context.exit();
		}
		return config;
	}
687165
@Override
  public Config getOwnConfig(final ConfigKeyPath configKey) {
    try {
      return this.ownConfigCache.get(configKey, new Callable<Config>() {
        @Override
        public Config call()  {
          return InMemoryValueInspector.this.valueFallback.getOwnConfig(configKey);
        }
      });
    } catch (ExecutionException e) {
      // should NOT come here
      throw new RuntimeException("Can not getOwnConfig for " + configKey);
    }
  }
512887
function loadConfiguration() {
    let configuration;

    if (isInit()) {
        configuration = jsonReader('./.versionFilesList.json');

        // check configuration file's integrity
        if (!configuration.name || !configuration.currentVersion || !configuration.filesList || !configuration.versionPrefix) {
            sendError('E002');
        }

        // check .versionFilesList.json for missing informations
        if (configuration.name.length === 0 || configuration.currentVersion.length === 0) {
            sendError('E001');
        }
    }
    return configuration;
}
938493
public static void init(com.typesafe.config.Config conf) {
		try {
			config = ConfigFactory.load().getConfig(PARA);

			if (conf != null) {
				config = conf.withFallback(config);
			}

			configMap = new HashMap<>();
			for (Map.Entry<String, ConfigValue> con : config.entrySet()) {
				if (con.getValue().valueType() != ConfigValueType.LIST) {
					configMap.put(con.getKey(), config.getString(con.getKey()));
				}
			}
		} catch (Exception ex) {
			logger.warn("Para configuration file 'application.(conf|json|properties)' is missing from classpath.");
			config = com.typesafe.config.ConfigFactory.empty();
		}
	}
778084
private function loadConfiguration() {

		$config = $this->configWrapper->configuration();

		$this->configWrapper->loadGlobalConfig( $config );
		$this->configWrapper->loadProjectConfig( $config );

		$event = new ConfigurationLoadedEvent();
		$event->setConfiguration( $config );
		$this->eventDispatcher->dispatch( $event::NAME, $event );

		return $config;
	}
400784
public function setConfigValue() {
    $this->requireTransaction();
    $session = $this->getSession();
    $request = $this->getRequest();
    $response = $this->getResponse();
    $persistenceFacade = $this->getPersistenceFacade();

    // load model
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      $configKey = $request->getValue('name');
      $configValue = $request->getValue('value');

      // find configuration
      $configObj = null;
      $configList = Node::filter($authUser->getValue('UserConfig'), null, null,
              ['name' => $configKey]);
      if (sizeof($configList) > 0) {
        $configObj = $configList[0];
      }
      else {
        $configObj = $persistenceFacade->create('UserConfig');
        $configObj->setValue('name', $configKey);
        $authUser->addNode($configObj);
      }

      // set value
      if ($configObj != null) {
        $configObj->setValue('value', $configValue);
      }
    }

    // success
    $response->setAction('ok');
  }
366580
public Object getMethodConfigValue(String methodName, String configKey, Object defaultValue) {
        Object value = getMethodConfigValue(methodName, configKey);
        return value == null ? defaultValue : value;
    }