/** * Set a specific key to a value in the settings data. * * @param string|array $key Key string or associative array of key => value * @param mixed $value Optional only if the first argument is an array */ public function set($key, $value = null) { $this->checkLoaded(); $this->unsaved = true; if (is_array($key)) { foreach ($key as $k => $v) { ArrayUtil::set($this->data, $k, $v); } } else { ArrayUtil::set($this->data, $key, $value); } }