Sets all the required parameters to configure a given Source instance.

@param SourceConfig $sourceConfig

@throws \Msl\ResourceProxy\Exception\BadSourceConfigurationException

@return void
510606
public function setConfig(SourceConfig $sourceConfig)
    {
        // FILTERS
        // 1. Setting message status filter
        $filters = $sourceConfig->getFilter();
        if (isset($filters[self::MESSAGES_STATUS_FILTER])) {
            $messageStatus = $filters[self::MESSAGES_STATUS_FILTER];
            if ($messageStatus === self::UNREAD_ONLY_MESSAGES_FILTER) {
                $this->unreadOnly = true;
            }
        }
        // 2. Setting folder filter
        if (isset($filters[self::FOLDER_FILTER])) {
            $this->folder = $filters[self::FOLDER_FILTER];
        }

        // Calling parent method to set the rest of the required configuration
        parent::setConfig($sourceConfig);
    }
556728
private function setConfig($config)
    {
        $this->securityLevel = $config->config['project']['security_level'];
        if ($config->config['config']) {
            foreach ($config->config['config'] as $k => $v) {
                $this->log->debug("[ CONFIG Params ]" . $k . ": " . $v, []);
                $this->config->$k = $this->setSecurityLevel($v);
                $this->parameters["config"][$k] = $this->setSecurityLevel($v);
            }
        }

    }
1004724
public function setSource($source)
    {
        if ($source !== null && !\Erebot\Utils::stringifiable($source)) {
            throw new \Erebot\InvalidValueException('Not a valid nickname');
        }

        $this->source = $source;
    }
705975
public function setDbConfig($config) {
        $this->dbConfig = $config;

        $this->db = ConnectionManager::getDataSource($config);
        $this->db->cacheSources = false;

        return $this;
    }
367496
public function setConfig($config = NULL)
    {
        $this->config = $config;
        $this->debug->info(__FUNCTION__, 'setConfig: ' . json_encode($this->config));
    }
1263792
public function setConfig(array $config)
    {
        foreach ($config as $key => $value) {
            switch ($key) {
                case 'verbose':
                case 'loadEnv':
                    if (!is_bool($value)) {
                        throw new ConfigurationException($key, 'This should be a boolean value.');
                    }

                    $this->config[$key] = $value;
                    break;

                default:
                    throw new ConfigurationException($key, 'This is an unknown configuration option.');
            }
        }
    }
347945
public function setSource($source)
    {
        if ($this->memorize) {
            if (isset($_GET[$this->skip_var])) {
                $this->skip = $this->memorize('skip', (int) $_GET[$this->skip_var]);
            } else {
                $this->skip = (int) $this->recall('skip');
            }
        } else {
            $this->skip = @$_GET[$this->skip_var] + 0;
        }

        // Start iterating early ($source = DSQL of model)
        if ($source instanceof SQL_Model) {
            $source = $source->_preexec();
        }

        if ($source instanceof DB_dsql) {
            $source->limit($this->ipp, $this->skip);
            $source->calcFoundRows();
            $this->source = $source;
        } elseif ($source instanceof \atk4\data\Model) {
            $this->source = $source->setLimit($this->ipp, $this->skip);
        } elseif ($source instanceof Model) {
            $this->source = $source->setLimit($this->ipp, $this->skip);
        } else {
            // NOTE: no limiting enabled for unknown data source
            $this->source = &$source;
        }
    }
1185512
protected function setUpSpecificConfigurations(Configuration $config)
    {
        $config->setQueryCacheImpl($this->getQueryCacheDriver());
        $config->setResultCacheImpl($this->getResultCacheDriver());
        $config->setHydrationCacheImpl($this->getHydratorCacheDriver());

        $config->setNamingStrategy($this->getNamingStrategy());
        $config->setQuoteStrategy($this->getQuoteStrategy());

        if ($this->getSecondLevelCacheConfiguration() !== null) {
            $config->setSecondLevelCacheEnabled(true);
            $config->setSecondLevelCacheConfiguration($this->getSecondLevelCacheConfiguration());
        }

        $config->setSQLLogger($this->getSQLLogger());
        $config->setCustomStringFunctions($this->getCustomStringFunctions());
        $config->setCustomNumericFunctions($this->getCustomNumericFunctions());
        $config->setCustomDatetimeFunctions($this->getCustomDateTimeFunctions());

        foreach ($this->getCustomFilters() as $name => $filterClass) {
            $config->addFilter($name, $filterClass);
        }
    }
413435
public function setSources(array $sources)
    {
        $parameters = $this
            ->configuration
            ->getParameters();
        $parameters['sources'] = $sources;

        $this
            ->configuration
            ->setParameters($parameters);
    }
194849
public function setSourceValue($sourceValue)
    {
        if (is_int($sourceValue)) {
            $this->sourceValue = $sourceValue;
        } else {
            $msg = "SourceValue must be an integer, '" . gettype($sourceValue) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
103590
public function setConfig($config){
        $this->config = $config;
        foreach ($config as $key => $value) {
            $this->app->config($key, $value);
        }
    }
639331
public function updateConfig(&$config)
    {
        if (!isset($config['types'])) {
            $config['types'] = [];
        }

        $config['types']['VersionedStage'] = VersionedStage::class;
        $config['types']['VersionedStatus'] = VersionedStatus::class;
        $config['types']['VersionedQueryMode'] = VersionedQueryMode::class;
        $config['types']['VersionedInputType'] = VersionedInputType::class;
        $config['types']['CopyToStageInputType'] = CopyToStageInputType::class;
    }
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());
    }
248480
public function loadConfiguration(ConfigurationLoader $loader, array $params = [])
	{
		try
		{
			$data = $loader->findLoader($this->source)->load($this->source, $params);
			
			return new Configuration($this->createBase($data));
		}
		catch(\Exception $e)
		{
			throw new ConfigurationLoadingException(sprintf('Unable to load config from source "%s"', $this->source->getPathname()), 0, $e);
		}
	}
897112
protected function setUpGeneralConfigurations(Configuration $config)
    {
        $this->setupAnnotationMetadata();
        $config->setMetadataDriverImpl($this->getMetadataMappingDriver());

        $config->setProxyDir($this->getProxiesPath());
        $config->setProxyNamespace($this->getProxiesNamespace());
        $config->setAutoGenerateProxyClasses($this->getProxiesAutoGeneration());

        if ($this->getRepositoryFactory() !== null) {
            $config->setRepositoryFactory($this->getRepositoryFactory());
        }

        if ($this->getDefaultRepositoryClass() !== null) {
            $config->setDefaultRepositoryClassName($this->getDefaultRepositoryClass());
        }

        $config->setMetadataCacheImpl($this->getMetadataCacheDriver());
    }
1192974
public function setConfig($config)
	{
		if (is_object($config)) {
			$config = get_object_vars($config);
		}
		foreach ($config as $index => $value) {
			$this->$index = $value;
		}
	}
904833
public static function setSource($source = null)
    {
        if (! is_resource($source) && ! is_null($source)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid source provided; must be a null or an resource, "%s" given.',
                is_object($source) ? get_class($source) : gettype($source)
            ));
        }
        static::$source = $source;
    }