Example #1
0
 public static function factory(Storage $storage, $row)
 {
     $tempfile = new TempFile($storage);
     $tempfile->setTempFileID($row["tempfileid"]);
     $tempfile->setTimestamp($row["timestamp"]);
     $tempfile->setUserID($row["userid"]);
     $tempfile->setFileID($row["fileid"]);
     return $tempfile;
 }
 private function generateTempFile()
 {
     $tempfile = new TempFile($this->getStorage());
     $file = new File($this->getStorage());
     $file->setExportFilename("vpanel-chart-" . date("Y-m-d"));
     $file->save();
     $tempfile->setFile($file);
     $tempfile->setTimestamp(time());
     $tempfile->setUserID($this->getUserID());
     $tempfile->save();
     $this->tempfileids[] = $tempfile->getTempFileID();
     return $tempfile;
 }