Set the dynamic configset instance.

Note: This method should be called before {@see self::setAppConfig()}.

@param  EntityInterface $dynConfig A dynamic configset.
@throws InvalidArgumentException If a configset already exists.
@return self
779634
protected function setDynamicConfig(EntityInterface $dynConfig)
    {
        if ($this->dynamicConfig !== null) {
            throw new InvalidArgumentException(
                'Dynamic configset already assigned.'
            );
        }

        if ($this->appConfig !== null) {
            if ($dynConfig instanceof DelegatesAwareInterface) {
                $dynConfig->prependDelegate($this->appConfig);
            } else {
                $appConfig['dynamic'] = $dynConfig;
                $appConfig->prependDelegate($dynConfig);
            }
        }

        $this->dynamicConfig = $dynConfig;
        return $this;
    }
95062
public function setConfig()
    {
        // error
        if (func_num_args() < 2 || func_num_args() > 3) {
            throw new InvalidArgumentException('Invalid Call of method "config"');
        }

        // default main config
        if (func_num_args() == 2) {
            return $this->setConfig('main', func_get_arg(0), func_get_arg(1));
        }

        // default global config
        return $this->configObject(func_get_arg(0))->setConfig(func_get_arg(1), func_get_arg(2));
    }
1063296
public function set(EntityInterface $entity)
    {
        $key = get_class($entity).'::'.$entity->getId();
        $this->getCache()->set($key, $entity);
        return $this;
    }
830595
public function setProfile($config)
    {
        if (!is_array($config)) {
            $config = (string)$config;
        }
        $this->_applyConfig($config);

        return $this;
    }
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());
    }
298743
public function set($websiteId, ConfigInterface $config)
    {
        $foundDifference = false;

        foreach ($config->getData() as $key => $value) {
            if ($config->setConfigValue($key, $value, $websiteId)) {
                $foundDifference = true;
            }
        }

        if ($foundDifference) {
            $config->cleanScope();
        }

        return $this->statusResponseFactory->create()
            ->setStatus('ok');
    }
705975
public function setDbConfig($config) {
        $this->dbConfig = $config;

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

        return $this;
    }
720098
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = new Config($config);
        } else {
            // see if it's a file path
            if (is_file($config)) {
                $cfg = parse_ini_file($config, true);
                $this->config = new Config($cfg);
            } else {
                throw new \InvalidArgumentException(
                    'Could not load configuration file '.$config
                );
            }
        }
    }
540170
public function setOptions(? Iterable $config = null): self
    {
        if (null === $config) {
            return $this;
        }

        foreach ($config as $option => $value) {
            switch ($option) {
                case 'identity_class':
                case 'attribute_map_class':
                    $this->{$option} = (string) $value;

                break;
                default:
                    throw new InvalidArgumentException('invalid option '.$option.' given');
            }
        }

        return $this;
    }
781748
public function setConfiguration( models\Connection\Config $connectionConfig){
        $rest = $this->getService( self::API_CONNECTION_CONFIG);
        $rest->PUT( $connectionConfig);

        return $rest->getResult( models\Connection\Config::class);
    }
177788
public function setId($id)
    {
        $this->id = (string)$id;

        if (!$this->isIdValid($this->id)) {
            throw new InvalidIdException($this);
        }

        return $this;
    }
1023306
public function setSdkConfig($sdkConfig = NULL)
    {
        $this->sdkConfig = $sdkConfig;
        $this->logger->debug(__FUNCTION__, 'Config Data: ' . json_encode($this->sdkConfig));
        if (empty($this->sdkConfig) || !is_array($this->sdkConfig)) {
            $this->error = TRUE;
            $this->logger->error(__FUNCTION__, 'Config Data is Empty!');
        }

        return $this;
    }
1313659
public function setConfig(array $config)
    {
        try {
            $this->config = $this
                ->getConfigResolver()
                ->resolve($config);
        } catch (ExceptionInterface $e) {
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
533302
public function setContextConfig(array $config)
    {
        if ($this->type == InternalBaseBlock::INJECTOR_VAR) {
            return $this->context->addVar($config, $this->append);
        }
         
        if ($this->type == InternalBaseBlock::INJECTOR_CFG) {
            return $this->context->addCfg($config, $this->append);
        }
        
        throw new InvalidConfigException("The type '{$this->type}' is not supported.");
    }
262454
protected function validateConnectionConfig($connectionConfig)
    {
        if (!is_array($connectionConfig)) {
            throw new InvalidArgumentException($this->translate(
                'Db driver configuration should be an array or Traversable.'
            ));
        }

        if (!isset($connectionConfig['type'])) {
            throw new InvalidArgumentException($this->translate(
                'Cannot find connection type in configuration.'
            ));
        } else {
            if (!in_array($connectionConfig['type'], $this->supportedConnectionTypes)) {
                throw new InvalidArgumentException('Wrong connection type: ' . $connectionConfig['type']);
            }
        }

        if (isset($connectionConfig['options'])) {
            if (!(is_array($connectionConfig['options']))) {
                throw new InvalidArgumentException($this->translate(
                    'Db driver options should be an array or Traversable.'
                ));
            }
        }
    }
85121
public static function init(array $config)
    {
        if (empty($config['storage']) || ($config['storage'] != self::FILE && $config['storage'] != self::POP3)) {
            throw new \InvalidArgumentException('need at least type in params');
        }

        $className = __NAMESPACE__.'\\'.$config['storage'];

        return new  $className($config);
    }
56248
public function setOptions(? Iterable $config = null): AdapterInterface
    {
        if (null === $config) {
            return $this;
        }

        foreach ($config as $option => $value) {
            switch ($option) {
                case 'provider_url':
                case 'token_validation_url':
                    $this->{$option} = (string) $value;
                    unset($config[$option]);

                break;
            }
        }

        return  parent::setOptions($config);
    }