/** * 設定をリストアする */ 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; }
public function get($id, &$meta = null) { if ($this->has($id)) { $data = unserialize(FileInfo::getContents($this->getFilePath($id))); $meta = $data['meta']; return $data['data']; } return null; }