/** * 設定を保存する */ public function save() { $file = Context::singleton()->getCachePath("config", $this->_name); FileInfo::putContents($file, serialize($this->_config)); }
public function set($id, $value, $meta = []) { $data = ['meta' => array_merge(['time' => time()], $meta), 'data' => $value]; FileInfo::putContents($path = $this->getFilePath($id), serialize($data)); return $path; }