ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilBibliographicExporter.php
Go to the documentation of this file.
1 <?php
2 
29 {
30  protected ?\ilBibliographicDataSet $ds = null;
34  protected $db;
35 
36 
37  public function init(): void
38  {
39  global $DIC;
40  $ilDB = $DIC['ilDB'];
41  $this->ds = new ilBibliographicDataSet();
42  $this->ds->setDSPrefix('ds');
43  $this->db = $ilDB;
44  }
45 
46 
47  public function getValidSchemaVersions(string $a_entity): array
48  {
49  return ['4.5.0' => ['namespace' => 'http://www.ilias.de/Modules/DataCollection/dcl/4_5', 'xsd_file" => "ilias_dcl_4_5.xsd', 'uses_dataset' => true, 'min' => '4.5.0', 'max' => '']];
50  }
51 
52 
53  public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
54  {
56  $this->ds->initByExporter($this);
57  $this->ds->exportLibraryFile($a_id, $this->getAbsoluteExportDirectory());
58 
59  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], '', true, true);
60  }
61 
63  string $a_entity,
64  string $a_target_release,
65  array $a_ids
66  ): array {
67  $res = [];
68  if ($a_entity === "bibl") {
69  $res[] = [
70  "component" => "components/ILIAS/ILIASObject",
71  "entity" => "common",
72  "ids" => $a_ids
73  ];
74  }
75  return $res;
76  }
77 }
$res
Definition: ltiservices.php:69
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Bibliographic dataset class.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
global $DIC
Definition: shib_login.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...