Returns a configuration from the underlying property object.

@param configName The name of the configuration.
@param def the default value, if no config is found.
@return Can be null if the config name does not exists.
963823
public String getConfig(String configName, String def)
  {
    if (config != null)
    {
      return config.getProperty(configName, def);
    }
    else
    {
      return def;
    }
  }
309643
public String getRequiredConfigAttributeWithConfigId(Map<String, Object> props, String key, String configId) {
        return getRequiredConfigAttributeWithDefaultValueAndConfigId(props, key, null, configId);
    }
896219
public Object getMethodConfigValue(String methodName, String configKey) {
        if (configValueCache == null) {
            return null;
        }
        String key = buildmkey(methodName, configKey);
        return configValueCache.get(key);
    }
960197
@Override
   public List<ConfigPropType> getConfigProps(Definition def)
   {
      return def.getMcfDefs().get(getNumOfMcf()).getMcfConfigProps();
   }
1110827
public function getConfig( $key = null, $def = null )
	{
		return Config::get( 'exceptions' . ( empty( $key ) ? "" : "." . $key ), $def );
	}
185801
@Override
  public String get(String key) {
    Object value = conf.get(key);
    if(null != value) {
      return value.toString();
    }
    else {
      return null;
    }
  }
1195087
public function getConfig(string $configName, array $context = []): array
    {
        $config = $this->udwConfiguration[$configName] ?? [];
        $defaults = $this->udwConfiguration['default'] ?? [];

        $config = $this->mergeConfiguration($defaults, $config);

        $configResolveEvent = new ConfigResolveEvent();

        $configResolveEvent->setConfigName($configName);
        $configResolveEvent->setContext($context);
        $configResolveEvent->setConfig($config);

        /** @var ConfigResolveEvent $event */
        $event = $this->eventDispatcher->dispatch(ConfigResolveEvent::NAME, $configResolveEvent);

        return $event->getConfig();
    }
1147842
static void setConfig(String configName) throws Exception {
		Handler.configName = configName;
		config = (HandlerConfig) Config.getInstance().getJsonObjectConfig(configName, HandlerConfig.class);
		initHandlers();
		initPaths();
	}
1017705
public static SarlConfig getConfiguration(ConfigurationFactory configFactory) {
		assert configFactory != null;
		return configFactory.config(SarlConfig.class, PREFIX);
	}
1030144
public void setConfig(String configName, String configValue)
  {
    if (config == null)
    {
      config = new Properties();
    }

    if(configValue == null)
    {
      config.remove(configName);
    }
    else
    {
      config.setProperty(configName, configValue);
    }
  }
1279059
public static function get(String $configName, String $name) : String
    {
        $config = Config::default('ZN\Services\CDNDefaultConfiguration')
                        ::get('CDNLinks');

        $configData = ! empty($config[$configName]) ? $config[$configName] : '';

        if( empty($configData) )
        {
            return false;
        }

        $data = array_change_key_case($configData);
        $name = strtolower($name);

        if( isset($data[$name]) )
        {
            return $data[$name];
        }
        else
        {
            return $data;
        }
    }
16097
public final Configuration getConfig(final File configFile, final InputStream configData)
            throws IOException {
        final Configuration configuration = this.context.getBean(Configuration.class);
        configuration.setConfigurationFile(configFile);
        MapfishPrintConstructor.setConfigurationUnderConstruction(configuration);

        final Configuration config =
                this.yaml.load(new InputStreamReader(configData, "UTF-8"));
        if (this.doValidation) {
            final List<Throwable> validate = config.validate();
            if (!validate.isEmpty()) {
                StringBuilder errors = new StringBuilder();
                for (Throwable throwable: validate) {
                    errors.append("\n\t* ").append(throwable.getMessage());
                    LOGGER.error("Configuration Error found", throwable);
                }
                throw new Error(errors.toString(), validate.get(0));
            }
        }
        return config;
    }
219343
public static HierarchicalConfiguration findForName(final HierarchicalConfiguration config, final String subKey, final String nameKey,
		final String nameValue)
			throws ConfigurationException {
		for (HierarchicalConfiguration subConfig : config.configurationsAt(subKey)) {
			String name = subConfig.getString(nameKey);
			if (name.equals(nameValue)) {
				return subConfig;
			}
		}
		// 没有找到
		throw new ConfigurationException(MessageFormats.format(ResourceBundles.getBundle(RESOURCE_BASENAME), "subnodeNotFound", nameKey, nameValue, subKey));
	}
353716
@PublicEvolving
	public String getValue(ConfigOption<?> configOption) {
		Object o = getValueOrDefaultFromOption(configOption);
		return o == null ? null : o.toString();
	}
952605
@FFDCIgnore(PrivilegedActionException.class)
    private String getConfigNameForRef(final String ref) {
        String name = null;
        if (ref != null) {
            final ConfigurationAdmin configAdmin = configAdminRef.getService();
            Configuration config;
            try {
                config = AccessController.doPrivileged(new PrivilegedExceptionAction<Configuration>() {
                    @Override
                    public Configuration run() throws IOException {
                        return configAdmin.getConfiguration(ref, configAdminRef.getReference().getBundle().getLocation());
                    }
                });
            } catch (PrivilegedActionException paex) {
                return null;
            }
            Dictionary<String, Object> props = config.getProperties();
            name = (String) props.get(KEY_NAME);
        }
        return name;
    }
376668
@Override
	public String getProperty(final String value, final String def) {
		final String result = getProperty(value);
		return result == null ? def : result;
	}
131910
public Config getTweakedConfig(Config config, String dbModuleName)
    {
        return Config.getOverriddenConfig(config,
                new MapConfiguration(getConfigurationTweak(dbModuleName)));
    }