public function saveConfig() { $this->save(); $values = $this->data; $this->loadConfig(); $data =& $this->data; foreach ($this->root as $item) { $data =& $data[$item]; } $data = $data ?: array(); $data = Arrays::mergeTree($values, $data); file_put_contents($this->fileName, $this->adapter->dump($this->data)); if (function_exists('opcache_reset')) { opcache_reset(); } }
public function save() { file_put_contents($this->fileName, $this->adapter->dump((array) $this->data)); $this->load(); }