Public 
@method setConfig
@param {Object} config A config object
@param {Function} getPIN A function which returns a valid PIN
@param {Function} next(err)
@example
trakter.setConfig( {config,getPIN,next)
346276
function setConfig (conf,getPIN,next) {
    // check the token
    config = clone(conf);
    if (!conf.client_id || typeof conf.client_id != 'string') {
        next(new Error ('Trakter: No client ID in configuration'));
        return;
    }
    if (!conf.client_secret || typeof conf.client_secret != 'string') {
        next(new Error ('Trakter: No client secret in configuration'));
        return;
    }
    // set defaults
    config.redirect_uri= config.redirect_uri || "urn:ietf:wg:oauth:2.0:oob";
    config.state = config.state || "aufhof9qw12nsdv42";
    

    config.options = config.options || {};
    config.options.host = config.options.host || 'api-v2launch.trakt.tv';
    config.options.port = config.options.port || 443;

    config.options.headers = config.options.headers || {};
    config.options.headers['Content-type'] = config.options.headers['Content-type'] || 'application/json';
    config.options.headers['trakt-api-version'] = config.options.headers['trakt-api-version'] || 2;
    config.options.headers['trakt-api-key'] = config.client_id;

    if (!config.token) {
        if (!getPIN || typeof getPIN != 'function') {
            var e = new Error ('Trakter: setConfig - missing getPIN function');
            e.name = 'TrakterGetPIN';
            e.code = 98;
            next (e);
            return;
        }
        if (!conf.pinUrl || typeof conf.pinUrl != 'string') {
            next(new Error ('Trakter: No URL for PIN in configuration'));
            return;
        }
        exchangePIN(getPIN(conf.pinUrl),next);
    } else {
        next();
    }
}
81074
public void setConfig(Map<String, ? extends CacheConfig> config) {
        this.configMap = (Map<String, CacheConfig>) config;
    }
295526
function applyConfig(config) {
    var previous = {};

    config.rules.forEach(function (rule) {
        var isprev = (rule.value === '$previous');
        var setOption = function (name, value) {
            previous[name] = this.current[name];
            this.current[name] = this.setOption(name, value, isprev);
        }.bind(this);
        if (rule.type === 'rule') {
            setOption(rule.name, isprev ? this.previous[rule.name]
                                        : rule.value);
        /* istanbul ignore else */
        } else if (rule.type === 'preset') {
            var preset = isprev ? this.previousPreset
                                : presets.presets[rule.value];
            Object.keys(preset).forEach(function (name) {
                setOption(name, preset[name]);
            });
        }
    }.bind(this));

    lodash.merge(this.previous, this.previousPreset = previous);
}
68501
function (config) {
			
			var nbChoices, position = -1;
			
			nbChoices = this.choicesList.length;
			
			// Handle position
			if (lang.isNumber(config.position) && config.position >= 0 && config.position < nbChoices) {
				
				position = parseInt(config.position, 10);
				
			} else if (!lang.isUndefined(config.value)) {
				
				// get position of choice with value === config.value
				position = inputEx.indexOf(config.value, this.choicesList, function (value, opt) {
					return opt.value === value;
				});
				
			} else if (lang.isString(config.label)) {
				
				// get position of choice with label === config.label
				position = inputEx.indexOf(config.label, this.choicesList, function (label, opt) {
					return opt.label === label;
				});
				
			}
			
			return position;
		}
611654
public static function set($config = null, bool $force = false)
    {
        if ( ! $force && ! empty(self::$config)) {
            return;
        }

        if (is_array($config)) {
            self::$config = $config;
        } else {
            self::$config = require $config ?? self::DEFAULT_CONFIG_PATH;
        }
    }
1329193
public function setConfig($config = [])
    {
        if (!empty($config) && is_array($config)) {
            $this->config = $config;
        } else {
            $this->config = NULL;
        }
        $this->debug->debug(__FUNCTION__, '$this->config: ' . json_encode($this->config));

        return $this;
    }
802470
function init(config) {
    var tokenConfig = config.security.token || {};
    var privateKey = tokenConfig.privateKey;
    var decryptedToken = {
        _id: tokenConfig.webserverId,
        authToken: tokenConfig.webserverToken
    };
    var jwt = jsonwebtoken.sign(decryptedToken, privateKey);

    headers = { 'Authorization': 'Bearer ' + jwt };

    admin._id =  mongo.newObjectId('000000000000000000000000');
    admin.name = 'systemAdmin';
    admin.type = 'user';
    admin.role = 'admin';

    var apiConfig = config.api || {};
    var host = apiConfig.internalHost || apiConfig.host;  // from web server to api use internalHost name
    var useSSL = apiConfig.serverUseSSL !== undefined ?
        apiConfig.serverUseSSL : config.useSSL;
    baseUrl = (useSSL ? 'https://' : 'http://') + host;

    var port = config.api.port;
    if (port !== 80 && port !== 443) {
        baseUrl += ':' + port;
    }

    baseUrl += '/' + config.api.version;

    return config;
}
100802
function ConfigValue(key, value) {
  this.name = ConfigValue.name;
  StoreError.apply(
    this, [null, 'invalid argument \'%s\' for CONFIG SET \'%s\'', value, key]);
}
17210
function getConfig(req, res, next) {
  var params = {
    appId: req.params.projectid || req.params.id
  };

  forms.getAppConfig(req.connectionOptions, params, formsResultHandlers(constants.resultTypes.formProjects, req, next));
}
243625
function initUserConfig ( config ) {

    var parsedConfig = {};

    if ( !config ) {
        return;
    }

    config = config.split( ";" );

    $.each( config, function ( index, item ) {

        item = item.split( ":" );
        parsedConfig[ item[ 0 ] ] = item[ 1 ];

    } );

    setUserConfig( parsedConfig );

}
1145228
function Config (config, defaultConfig) {
  validateConfig(config);
  deepAssign(this, defaultConfig || Config.defaults);

  if (config) {
    deepAssign(this, config);
  }
}
268783
def set_config(self, config):
    
    if self.config is None:
      self.config = { }
    self.config.update(config_to_api_list(config))
275923
public static Configuration when(Option first, Option... next) {
        return Configuration.empty().withOptions(first, next);
    }
968688
function (config, options) {
    this.config = config;
    this.options = options;
    this.channel = null;
    this._status = CONNECT_STATUS.unconnected;
}
1027796
function Config(ringpop, seedConfig) {
    seedConfig = seedConfig || {};
    this.ringpop = ringpop;
    this.store = {};
    this._seed(seedConfig);
}
340560
function setConfigObject (config, prev) {
    Object.keys(config).forEach(function (key) {
      var value = config[key]
      var fullKey = prev ? prev + '.' + key : key

      // if the value is an inner object and we have dot-notation
      // enabled, treat inner objects in config the same as
      // heavily nested dot notations (foo.bar.apple).
      if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
        // if the value is an object but not an array, check nested object
        setConfigObject(value, fullKey)
      } else {
        // setting arguments via CLI takes precedence over
        // values within the config file.
        if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
          setArg(fullKey, value)
        }
      }
    })
  }
562371
function(config, name) {
            if (config && config !== Object(config)) {
                throw new Error('Config object should be a key/value object.');
            }

            var defaultConfig = {
                loop: false,
                maxLoops: Infinity
            };

            var instance = Object.create(Queue);

            this.queues.push(name ? {
                name: name,
                instance: instance
            } : {
                instance: instance
            });

            merge(instance, {
                config: merge({}, defaultConfig, config),
                steps: []
            });

            return instance;
        }