ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
62 #[\Override]
64 string $a_entity,
65 string $a_target_release,
66 array $a_ids
67 ): array {
68 $res = [];
69 if ($a_entity === "bibl") {
70 $res[] = [
71 "component" => "components/ILIAS/ILIASObject",
72 "entity" => "common",
73 "ids" => $a_ids
74 ];
75 }
76 return $res;
77 }
78}
Bibliographic dataset class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
Xml Exporter class.
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26