3 declare(strict_types=1);
    30     private string $version = self::CURRENT_VERSION;
    37     public function __construct(
int $a_obj_id, 
string $a_export_type = 
'', 
string $a_filename = 
'')
    41         $this->db = $DIC->database();
    42         $this->obj_id = $a_obj_id;
    43         $this->export_type = $a_export_type;
    44         $this->file_name = $a_filename;
    57         $ilDB = $DIC->database();
    59         $query = 
"SELECT * FROM export_file_info " .
    60             "WHERE obj_id = " . 
$ilDB->quote($a_obj_id, 
'integer') . 
' ' .
    61             "AND export_type = " . 
$ilDB->quote($a_type, 
'text') . 
' ' .
    62             "ORDER BY create_date DESC";
    65             if (!$a_version || $row->version == $a_version) {
    66                 return new ilExportFileInfo((
int) $row->obj_id, $row->export_type, $row->filename);
    76         $ilDB = $DIC->database();
    77         $ilDB->manipulate(
"DELETE FROM export_file_info WHERE obj_id = " . 
$ilDB->quote(
    86         $this->export_type = $a_type;
    96         $this->file_name = $a_name;
   111         $this->obj_id = $a_id;
   121         $this->version = $a_version;
   136         $this->create_date = $dt;
   141         $exists_query = 
'select * from export_file_info ' .
   142             'where obj_id = ' . $this->db->quote($this->obj_id, 
'integer') . 
' ' .
   143             'and export_type = ' . $this->db->quote($this->
getExportType(), 
'text') . 
' ' .
   144             'and filename = ' . $this->db->quote($this->
getFilename(), 
'text');
   145         $exists_res = $this->db->query($exists_query);
   147         if (!$exists_res->numRows()) {
   148             $query = 
"INSERT INTO export_file_info (obj_id, export_type, filename, version, create_date) " .
   150                 $this->db->quote($this->
getObjId(), 
'integer') . 
', ' .
   152                 $this->db->quote($this->
getFilename(), 
'text') . 
', ' .
   153                 $this->db->quote($this->
getVersion(), 
'text') . 
', ' .
   159             $this->db->manipulate($query);
   163     public function delete(): 
void   165         $this->db->manipulate(
   166             'DELETE FROM export_file_info ' .
   167             'WHERE obj_id = ' . $this->db->quote($this->getObjId(), 
'integer') . 
' ' .
   168             'AND filename = ' . $this->db->quote($this->getFilename(), 
'text')
   172     protected function read(): void
   174         $query = 
"SELECT * FROM export_file_info " .
   175             "WHERE obj_id = " . $this->db->quote($this->
getObjId(), 
'integer') . 
' ' .
   176             "AND export_type = " . $this->db->quote($this->
getExportType(), 
'text') . 
' ' .
   177             "AND filename = " . $this->db->quote($this->
getFilename(), 
'text');
   179         $res = $this->db->query($query);
 setVersion(string $a_version)
 
__construct(int $a_obj_id, string $a_export_type='', string $a_filename='')
 
setExportType(string $a_type)
 
static lookupLastExport(int $a_obj_id, string $a_type, string $a_version='')
Lookup last export. 
 
setCreationDate(?ilDateTime $dt=null)
 
getBasename(string $a_ext='.zip')
 
static deleteByObjId($a_obj_id)
 
setFilename(string $a_name)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...