/** * 設定をリストアする */ public static function restore($name) { $file = Context::singleton()->getCachePath("config", $name); $c = new Configuration($name); if (file_exists($file)) { $c->_config = unserialize(FileInfo::getContents($file)); } return $c; }
protected function initHandler(Hash $options) { $this->_stream = FileInfo::format($options->getVal('path', 'php://stdout')); }
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; }