ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilXmlImporter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25abstract class ilXmlImporter
26{
27 protected array $skip_entities = array();
28 protected ilImport $imp;
29 protected string $install_id;
30 protected string $install_url;
31 protected string $schema_version;
32 protected string $import_directory;
33
34 public function __construct()
35 {
36 }
37
38 public function setImport(ilImport $a_val): void
39 {
40 $this->imp = $a_val;
41 }
42
43 public function getImport(): ilImport
44 {
45 return $this->imp;
46 }
47
48 public function init(): void
49 {
50 }
51
52 public function setInstallId(string $a_val): void
53 {
54 $this->install_id = $a_val;
55 }
56
57 public function getInstallId(): string
58 {
59 return $this->install_id;
60 }
61
62 public function setInstallUrl(string $a_val): void
63 {
64 $this->install_url = $a_val;
65 }
66
67 public function getInstallUrl(): string
68 {
69 return $this->install_url;
70 }
71
72 public function setSchemaVersion(string $a_val): void
73 {
74 $this->schema_version = $a_val;
75 }
76
77 public function getSchemaVersion(): string
78 {
80 }
81
82 public function setImportDirectory(string $a_val): void
83 {
84 $this->import_directory = $a_val;
85 }
86
87 public function getImportDirectory(): string
88 {
90 }
91
92 public function setSkipEntities(array $a_val): void
93 {
94 $this->skip_entities = $a_val;
95 }
96
97 public function getSkipEntities(): array
98 {
100 }
101
102 // Is exporting and importing installation identical?
103 public function exportedFromSameInstallation(): bool
104 {
105 if ($this->getInstallId() > 0 && ($this->getInstallId() == IL_INST_ID)) {
106 return true;
107 }
108 return false;
109 }
110
111 abstract public function importXmlRepresentation(
112 string $a_entity,
113 string $a_id,
114 string $a_xml,
115 ilImportMapping $a_mapping
116 ): void;
117
118 public function finalProcessing(ilImportMapping $a_mapping): void
119 {
120 }
121
122 // Called after all container objects have been imported.
123 public function afterContainerImportProcessing(ilImportMapping $mapping): void
124 {
125 }
126}
Import class.
Xml importer class.
setSchemaVersion(string $a_val)
setSkipEntities(array $a_val)
setInstallUrl(string $a_val)
setImportDirectory(string $a_val)
finalProcessing(ilImportMapping $a_mapping)
afterContainerImportProcessing(ilImportMapping $mapping)
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
setInstallId(string $a_val)
setImport(ilImport $a_val)
const IL_INST_ID
Definition: constants.php:40