18 declare(strict_types=1);
    36         $this->db = $DIC->database();
    44         if (!isset(self::$instance)) {
    47         return self::$instance;
    55         $query = 
'SELECT * FROM ecs_export ' .
    56             'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer');
    57         $res = $this->db->query($query);
    70         $econtent_ids = array();
    71         $query = 
"SELECT econtent_id,obj_id FROM ecs_export " .
    72             'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
    74         $res = $this->db->query($query);
    76             $econtent_ids[$row->econtent_id] = $row->obj_id;
    86         $query = 
"SELECT obj_id FROM ecs_export ";
    87         $res = $this->db->query($query);
    90             $obj_ids[] = (
int)$row->obj_id;
   101         $query = 
"SELECT e.obj_id FROM ecs_export e" .
   102             " JOIN object_data o ON (e.obj_id = o.obj_id)" .
   103             " WHERE o.type = " . $this->db->quote($a_type, 
"text");
   104         $res = $this->db->query($query);
   106             $obj_ids[] = (
int)$row->obj_id;
   116         $query = 
'SELECT * FROM ecs_export ' .
   117             'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer');
   118         $res = $this->db->query($query);
   122             $sids[] = (
int) $row->server_id;
   132         $query = 
"SELECT obj_id FROM ecs_export " .
   133             'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
   134         $res = $this->db->query($query);
   137             $obj_ids[] = $row->obj_id;
   147         $query = 
'SELECT * FROM ecs_export ' .
   148             'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer') . 
' ';
   149         $res = $this->db->query($query);
   152             $sids[] = (
int)$row->server_id;
   165         if (!is_array($a_ids) || !count($a_ids)) {
   168         $query = 
"DELETE FROM ecs_export WHERE " . $this->db->in(
'econtent_id', $a_ids, 
false, 
'integer') . 
' ' .
   169             'AND server_id = ' . $this->db->quote($a_server_id, 
'integer');
   170         $this->db->manipulate($query);
   179         $query = 
'DELETE FROM ecs_export ' .
   180             'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
   181         $this->db->manipulate($query);
   187     public function _isRemote(
int $a_server_id, 
int $a_econtent_id): bool
   189         $query = 
"SELECT obj_id FROM ecs_export " .
   190             "WHERE econtent_id = " . $this->db->quote($a_econtent_id, 
'integer') . 
" " .
   191             'AND server_id = ' . $this->db->quote($a_server_id, 
'integer');
   192         $res = $this->db->query($query);
 
_deleteEContentIds(int $a_server_id, array $a_ids)
Delete econtent ids for server. 
 
_isRemote(int $a_server_id, int $a_econtent_id)
is remote object 
 
static getInstance()
Get the singelton instance of this ilECSExportManager. 
 
getExportedIds()
Get exported ids. 
 
_getExportedIDsByServer(int $a_server_id)
get exported ids for server 
 
getExportedIdsByType(string $a_type)
Get exported ids by type. 
 
deleteByServer(int $a_server_id)
Delete by server id. 
 
getExportServerIds(int $a_obj_id)
lookup server ids of exported materials 
 
_isExported(int $a_obj_id)
Check if object is exported. 
 
static ilECSExportManager $instance
 
lookupServerIds(int $a_obj_id)
Lookup server ids of exported objects. 
 
Manage the ECS exported contents. 
 
_getAllEContentIds(int $a_server_id)
get all exported econtent ids per server