示例#1
0
 /**
  * 設定を保存する
  */
 public function save()
 {
     $file = Context::singleton()->getCachePath("config", $this->_name);
     FileInfo::putContents($file, serialize($this->_config));
 }
示例#2
0
 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;
 }