/** * Formats the output and saved it to disk. * * @param $contents $contents config array to save * @return bool \File::update result */ public function save($contents) { // store the current filename $file = $this->file; // save it $return = parent::save($contents); // existing file? saved? and do we need to flush the opcode cache? if ($file == $this->file and $return and static::$flush_needed) { if ($this->file[0] !== '/' and (!isset($this->file[1]) or $this->file[1] !== ':')) { // locate the file $file = \Finder::search('config', $this->file, $this->ext); } // make sure we have a fallback $file or $file = APPPATH . 'config' . DS . $this->file . $this->ext; // flush the opcode caches that are active static::$uses_opcache and opcache_invalidate($file, true); static::$uses_apc and apc_compile_file($file); } return $return; }