public static function factory(Storage $storage, $row) { $tempfile = new File($storage); $tempfile->setFileID($row["fileid"]); $tempfile->setFilename($row["filename"]); $tempfile->setExportFilename($row["exportfilename"]); $tempfile->setMimeType($row["mimetype"]); return $tempfile; }