Injects the Flow settings, the persistence part is kept
for further use.

@param array $settings
@return void
@throws InvalidConfigurationException
770851
public function injectSettings(array $settings)
    {
        $this->settings = $settings['persistence'];
        if (!is_array($this->settings['backendOptions'])) {
            throw new InvalidConfigurationException(sprintf('The Neos.Flow.persistence.backendOptions settings need to be an array, %s given.', gettype($this->settings['backendOptions'])), 1426149224);
        }
        if (!is_array($this->settings['doctrine']['secondLevelCache'])) {
            throw new InvalidConfigurationException(sprintf('The TYPO3.Flow.persistence.doctrine.secondLevelCache settings need to be an array, %s given.', gettype($this->settings['doctrine']['secondLevelCache'])), 1491305513);
        }
    }
1246861
public function setParams($params) {
        if (!is_array($params)) {
            throw new \InvalidArgumentException('Paramater $params must be an array.');
        }

        foreach ($params as $name => $value) {
            if (isset($this->params[$name]) || array_key_exists($name, $this->params)) {
                if (is_array($this->params[$name])) {
                    if (is_array($value)) {
                        $this->params[$name] = array_merge($this->params[$name], $value);
                    }
                    else {
                        throw new ConfigurationException(sprintf('Parameters type mismatch. Given type is "%s", expected type is "%s"', gettype($this->params[$name]) ,gettype($value)));
                    }
                }
                else {
                    $this->params[$name] = $value;
                }
            }
            else {
                throw new ConfigurationException(sprintf('Parameter "%s" doesn\'t exists', $name));
            }
        }
    }
162370
public static function overload(array $settings)
    {
        if (self::mustLoad()) {
            self::load();
        }
        foreach ($settings as $var=>$val) {
            self::set($var, $val);
        }
    }
1046306
protected function updateSettings(array $settings)
    {
        $this->controlAccess('module_edit');

        $this->module->setSettings('export', $settings);
        $this->redirect('', $this->text('Settings have been updated'), 'success');
    }
1038059
public function setLabelsSettings(array $Settings = [])
    {
        if (isset($Settings["Type"])) {
            $this->Labels["Type"] = $Settings["Type"];
        }
        if (isset($Settings["R"])) {
            $this->Labels["R"] = $Settings["R"];
        }
        if (isset($Settings["G"])) {
            $this->Labels["G"] = $Settings["G"];
        }
        if (isset($Settings["B"])) {
            $this->Labels["B"] = $Settings["B"];
        }
        if (isset($Settings["Alpha"])) {
            $this->Labels["Alpha"] = $Settings["Alpha"];
        }
    }
1015780
private function applyOrders(array $settings): void
    {
        $data = $this->getSource();
        // Create empty column stack
        $orders = [];
        foreach ($settings as $column => $order) {
            $orders[$column] = [];
        }

        // Obtain a list of columns
        foreach ($data as $key => $row) {
            foreach ($settings as $column => $order) {
                $orders[$column][$key] = $row[$column];
            }
        }

        // Prepare array of arguments
        $funcArgs = [];
        foreach ($settings as $column => $order) {
            $funcArgs[] = $orders[$column];
            $funcArgs[] = ($order === Grid\Grid::ORDER_ASC) ? SORT_ASC : SORT_DESC;
        }
        $funcArgs[] = &$data;

        // Sort the data with volume descending, edition ascending
        // Add $data as the last parameter, to sort by the common key
        array_multisort(...$funcArgs);
        $this->setSource($data);
    }
453644
public function setOptions(array $options)
    {
        if (! array_key_exists(self::CONFIG_SOURCE, $options)
            || ! is_array($options[self::CONFIG_SOURCE])
            || empty($options[self::CONFIG_SOURCE])
        ) {
            throw new InconsistencyConfigException(__('Injector has to contains a valid "source" field.'));
        }

        if (! array_key_exists(self::CONFIG_DESTINATION, $options)
            || ! is_array($options[self::CONFIG_DESTINATION])
            || empty($options[self::CONFIG_DESTINATION])
        ) {
            throw new InconsistencyConfigException(__('Injector has to contains a valid "destination" field.'));
        }

        parent::setOptions($options);
    }
1186529
protected function validateConfig(SettingsInterface $settings)
    {
        foreach ($this->getRequiredSettings() as $required_setting) {
            if (is_null($settings->getValues($required_setting))) {
                throw new ConfigError(
                    "Missing mandatory setting '" . $required_setting . "' for config."
                );
            }
        }
    }
233296
protected function addModelSettings(array &$settings)
    {
        $settings['elementClass']  = 'Date';
        $settings['dateFormat']    = $this->getDateFormat();
        $settings['storageFormat'] = $this->getStorageFormat();
        $settings['type']          = $this->type;
    }
1278399
public function register($settings)
    {
        if (!$this->enabled) {
            return;
        }

        if ($this->buffersize === 0 || $this->buffersize === 1) {
            $this->write($settings);

            return;
        }

        $settings = $this->parseSettings($settings);

        $payload = $this->getPayload($settings);

        $this->buffer[] = $payload;

        ++$this->buffercount;

        if ($this->buffersize !== -1 && $this->buffercount >= $this->buffersize) {
            $this->flush();
        }
    }
1238013
protected function configureInstance($options)
    {
        if (is_string($options)) {
            $this->setToken($options)->setTokenExpiresIn(null);
        } elseif (is_array($options)) {
            $this->configureInstanceAssoc($options);
        }
    }
42831
public function setSettings($settingList = []) {
        if (!$settingList) {
            return;
        }

        if (isset($settingList['persistent'])) {
            $this->setPersistent($settingList['persistent']);
        }

        if (isset($settingList['charset'])) {
            $this->setCharset($settingList['charset']);
        }
    }
26126
public static function configure($settings)
    {
        if (isset($settings['client_id'])) {
            self::configureOAuth($settings);
        } else {
            self::configureBasicAuth($settings);
        }
    }
212943
protected function storeDateSettings($settings)
    {
        // Set up start/end dates:
        $from = empty($settings['from'])
            ? $this->stateManager->loadDate() : $settings['from'];
        $until = empty($settings['until']) ? null : $settings['until'];
        $this->setStartDate($from);
        $this->setEndDate($until);
    }
915016
public function injectSettings(array $settings) {
		if (isset($settings['server']['serviceBaseUri'])) {
			$this->serverServiceBaseUri = $settings['server']['serviceBaseUri'];
		}
		if (isset($settings['server']['keyPairFingerprint'])) {
			$this->serverKeyPairFingerprint = $settings['server']['keyPairFingerprint'];
		}
	}
435455
public static function setMany($settings = [], $defaultSettings = [])
    {
        $settings = static::parseDefaultOptions($settings, $defaultSettings);

        array_walk($settings, function ($value, $key) {
            static::set($key, $value);
        });
    }
1309967
protected function addModelSettings(array &$settings)
    {
        $empty = [];
        if (!$this->_fieldDefinition['gtf_required'] || $this->_fieldDefinition['gtf_field_default'] === null) {
            $empty = $this->util->getTranslated()->getEmptyDropdownArray();
        }

        $multi = explode(parent::FIELD_SEP, $this->_fieldDefinition['gtf_field_values']);

        $settings['elementClass'] = 'Select';
        $settings['multiOptions'] = $empty + array_combine($multi, $multi);
    }