Example #1
0
 /**
  * 設定をリストアする
  */
 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;
 }
Example #2
0
 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;
 }