Configures component by passing configuration parameters.

        :param config: configuration parameters to be set.
422614
def configure(self, config):
        
        parameters = config.get_section("parameters")
        if len(parameters) > 0:
            self._parameters = parameters
1222181
public function initConfiguration(Configuration $configuration = null)
    {
        if (isset($configuration)) {
            $this->configuration = $configuration;
        }

        if (isset($this->configuration)) {
            $this->setLogger($this->configuration->getLogger());
            $this->componentFactory = null;
            $this->prepareFactory();
        }
    }
1133971
private function configure(array $config = [])
    {
        foreach ($config as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
    }
1345847
def configure(self, config):
        
        dependencies = config.get_section("dependencies")
        names = dependencies.get_key_names()
        for name in names:
            locator = dependencies.get(name)
            if locator == None:
                continue
            
            try:
                descriptor = Descriptor.from_string(locator)
                if descriptor != None:
                    self._dependencies[name] = descriptor
                else:
                    self._dependencies[name] = locator
            except Exception as ex:
                self._dependencies[name] = locator
592128
def configure(config={}, datastore=None, nested=False):
    
    if nested:
        config = nested_config(config)
    # Re-read settings to make sure we have everything.
    # XXX It would be really nice if we didn't need to do this.
    Settings.init(**config)

    if datastore:
        Switch.ds = datastore

    # Register the builtins
    __import__('switchboard.builtins')
691176
def set_config_parameter(self, param, value):
        '''

        '''
        with self._mutex:
            if self._obj.set_configuration(param, value) != RTC.RTC_OK:
                raise exceptions.FailedToSetConfigurationError(param, value)
            # Force a reparse of the configuration
            self._configuration = None
1117690
private function configure($config = [])
    {
        $this->config = $config;

        $this->configureVariable('ssl');
        $this->configureVariable('ssl_method');
        $this->configureVariable('ssl_name');
        $this->configureVariable('ssl_verify_sign');
        $this->configureVariable('ssl_verify_peer');
        $this->configureVariable('ssl_verify_depth');
    }
16141
protected function _setup($config) {
        if (!empty($config['url'])) {
            $this->_url = $config['url'];
        }
        if (!empty($config['params'])) {
            $this->_params = $config['params'];
        }
    }
1237331
def configure(self, config):
        
        self._name = config.get_as_string_with_default("name", self._name)
        self._name = config.get_as_string_with_default("info.name", self._name)

        self._description = config.get_as_string_with_default("description", self._description)
        self._description = config.get_as_string_with_default("info.description", self._description)

        self._properties = config.get_section("properties")
1001720
public function configure( Config $config )
    {
        parent::configure($config);

        $this->_field_order    = $this->processMacro($config->getList('field_order', []));
        $this->_delimiter      = $this->processMacro($config->getInteger('delimiter', 0));
        $this->_double_quoted  = $this->processMacro($config->getBoolean('double_quoted', false));
        $this->_eol_code       = $this->processMacro($config->getInteger('eol_code', 0));
    }
1129998
def update_config(config):
    

    # Update the default config with whatever is in the passed config
    update(bigchaindb.config, update_types(config, bigchaindb.config))
    bigchaindb.config['CONFIGURED'] = True
1238097
def configure(self, options, conf):
        
        Plugin.configure(self, options, conf)
        if options.filetype:
            self.filetypes += options.filetype
1287349
public function setConfiguration(Configuration $config)
    {
        if ($config === null) {
            throw new Exception\InvalidArgumentException('$config cannot be null');
        }


        if ($this->config !== null) {
            $this->config->unregisterConfigChangeListener($this->getConfigChangeListener());
        }

        $this->config = $config;
        $this->setOptions($config->getZendLdapConfiguration());
        $this->config->registerConfigChangeListener($this->getConfigChangeListener());
    }
65047
def set_config(self, config):
        
        with self._conn:
            self._conn.execute("DELETE FROM config")
            self._conn.execute('INSERT INTO config VALUES(?)',
                               (serialize_config(config),))
1062030
public final void initConfiguration(String config) {

        m_configuration = config;
        m_configurationMap = CmsStringUtil.splitAsMap(config, "|", ":");
        m_configurationMap.put(CmsContentDefinition.PARAM_INIT_CALL, INIT_FUNCTION_PREFIX + getName());
        m_jsonConfig = new JSONObject(new HashMap<String, Object>(m_configurationMap));
    }
186957
def configure(self, cfg, handler, path=""):

        

        # configure simple value attributes (str, int etc.)
        for name, attr in handler.attributes():
            if cfg.get(name) is not None:
                continue
            if attr.expected_type not in [list, dict]:
                cfg[name] = self.set(handler, attr, name, path, cfg)
            elif attr.default is None and not hasattr(handler, "configure_%s" % name):
                self.action_required.append(("%s.%s: %s" % (path, name, attr.help_text)).strip("."))

        # configure attributes that have complex handlers defined
        # on the config Handler class (class methods prefixed by
        # configure_ prefix
        for name, attr in handler.attributes():
            if cfg.get(name) is not None:
                continue
            if hasattr(handler, "configure_%s" % name):
                fn = getattr(handler, "configure_%s" % name)
                fn(self, cfg, "%s.%s"% (path, name))
                if attr.expected_type in [list, dict] and not cfg.get(name):
                    try:
                        del cfg[name]
                    except KeyError:
                        pass
1217978
def _configure(self, config):
		
		config = config or dict()
		
		# We really need this to be there.
		if 'extensions' not in config: config['extensions'] = list()
		
		if not any(isinstance(ext, BaseExtension) for ext in config['extensions']):
			# Always make sure the BaseExtension is present since request/response objects are handy.
			config['extensions'].insert(0, BaseExtension())
		
		if not any(isinstance(ext, arguments.ArgumentExtension) for ext in config['extensions']):
			# Prepare a default set of argument mutators.
			config['extensions'].extend([
					arguments.ValidateArgumentsExtension(),
					arguments.ContextArgsExtension(),
					arguments.RemainderArgsExtension(),
					arguments.QueryStringArgsExtension(),
					arguments.FormEncodedKwargsExtension(),
					arguments.JSONKwargsExtension(),
				])
		
		config['extensions'].append(self)  # Allow the application object itself to register callbacks.
		
		try:
			addLoggingLevel('trace', logging.DEBUG - 5)
		except AttributeError:
			pass
		
		# Tests are skipped on these as we have no particular need to test Python's own logging mechanism.
		level = config.get('logging', {}).get('level', None)
		if level:  # pragma: no cover
			logging.basicConfig(level=getattr(logging, level.upper()))
		elif 'logging' in config:  # pragma: no cover
			logging.config.dictConfig(config['logging'])
		
		return config