Correct the default values according to localization

@param array $options
@return void
@deprecated Should not be used anymore with 3.x functionality?
186811
public static function setConfig($options = []) {
		$config = $options + (array)Configure::read('Localization');
		foreach ($config as $key => $value) {
			$key = '_' . $key;
			if (!isset(static::${$key})) {
				continue;
			}
			static::${$key} = $value;
		}
	}
1356018
public function setOptions(array $options = null): void
    {
        // store options by default
        $this->options = (array)$options;

        // apply options
        foreach ($this->options as $key => $value) {
            $this->setOption($key, $value);
        }
    }
1131240
public function setOptions(array $options = []): void
    {
        $this->options = $this->shortcuts = [];
        $this->addOptions($options);
    }
1236762
public function setOptions(array $options = []) : void
    {
        $default = [
            "dsn"             => null,
            "username"        => null,
            "password"        => null,
            "driver_options"  => null,
            "table_prefix"    => null,
            "fetch_mode"      => \PDO::FETCH_OBJ,
            "emulate_prepares" => false,
            "session_key"     => "Anax\Database",
            "verbose"         => false,
            "debug_connect"   => false,
        ];

        $this->options = array_merge($default, $options);
    }
300358
public function SetOptions( $options ){
		foreach($options as $option => $value){
			$this->SetOption($option,$value);
		}
	}
1167900
public function save(array $options = []) {
        $saved = parent::save($options);

        array_walk($this->translations, function($translation, $locale)  {
            if(! array_filter($translation))
                return false;

            $this->newTranslation($locale, $translation)
                ->save();
        });

        return $saved;
    }
538863
public function initialize(array $options)
    {
        foreach ($options as $optionName => $optionValue) {
            $methodName = 'set' . ucfirst($optionName);
            if (method_exists($this, $methodName)) {
                $this->$methodName($optionValue);
            }
        }
    }
573621
public function save(array $options = [])
    {
        if (isset($this->translatable))
        {
            // set a default language (the one the user is currently using)
            if (!(isset($this->translation_lang)) || $this->translation_lang == '')
            {
                $this->translation_lang = \Lang::locale();
            }

            // TODO: if some untranslatable attributes are empty, but its parent's are filled, copy them
        }

        parent::save();
    }
931619
protected function applyOptions(array $options): void
    {
        $this->logger->info('Applying options...', ['options' => $options]);

        $this->options = array_merge($this->options, $options);

        $this->logger->debug('Options applied and merged with defaults', ['options' => $this->options]);
    }
1027077
protected function setOptions(array $options)
    {
        $this->options = array_merge(
            array_map(
                function ($value) {
                    return $value[0];
                },
                $this->supportedOptions
            ),
            $options
        );
    }
1085559
private function SaveOptions(array $options)
    {
        $prev = null;
        foreach ($options as $value=>$text)
        {
            $option = new SelectOption();
            $option->SetSelectField($this->select);
            $option->SetPrevious($prev);
            $option->SetText($text);
            $option->SetValue($value);
            $option->Save();
            $prev = $option;
        }
    }
710716
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->setOption($name, $value);
        }
    }
470764
protected function _initializationOptions($options = array()) {
		$defaults = array(
			'_buffer' => true,
			'_css' => true,
			'_cssText' => true,
			'_scripts' => true,
			'_scriptBlock' => false,
			'_editor' => true,
			'_inline' => true,
		);

		return json_encode(array_diff_key(array_merge(
			$defaults,
			(array)$options
		), $defaults));
	}
1286182
protected function setDefaultClasses(array $options = [])
    {
        $wrapper_class = $this->getConfig('defaults.' . $this->type . '.wrapper_class', '');
        $label_class = $this->getConfig('defaults.' . $this->type . '.label_class', '');
        $field_class = $this->getConfig('defaults.' . $this->type . '.field_class', '');

        $defaults = [];
        if ($wrapper_class && !Arr::get($options, 'wrapper.class')) {
            $defaults['wrapper']['class'] = $wrapper_class;
        }
        if ($label_class && !Arr::get($options, 'label_attr.class')) {
            $defaults['label_attr']['class'] = $label_class;
        }
        if ($field_class && !Arr::get($options, 'attr.class')) {
            $defaults['attr']['class'] = $field_class;
        }
        return $defaults;
    }
646762
public function setOptions(array $options)
    {
        if (isset($options['uniqueId'])) {
            $this->sessionId = $options['uniqueId'];
        }

        $this->options = $options;
    }
316326
public function config(array $options)
    {
        foreach ($options as $key => $value) {
            $method = 'set' . $key;
            if (method_exists($this, $method)) {
                call_user_func(array($this, $method), $value);
            }
        }
    }
102799
private static function adjustOptions(array $options) {
        $result = [];

        foreach($options as $key => $value) {
            $result[str_replace("-", "_", $key)] = $value;
        }

        return $result;
    }