This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
| __construct (string $a_top_entity, string $a_schema_version, string $a_xml, ilDataSet $a_ds, ilImportMapping $a_mapping) |
|
| getCurrentInstallationId () |
|
| setHandlers ($a_xml_parser) |
|
| handleBeginTag ( $a_xml_parser, string $a_name, array $a_attribs) |
|
| handleEndTag ( $a_xml_parser, string $a_name) |
|
| handleCharacterData ( $a_xml_parser, string $a_data) |
|
| __construct (?string $path_to_file='', ?bool $throw_exception=false) |
|
| setXMLContent (string $a_xml_content) |
|
| getXMLContent () |
|
| getInputType () |
|
| startParsing () |
| stores xml data in array More...
|
|
| createParser () |
|
| setHandlers ($a_xml_parser) |
|
| parse ($a_xml_parser, $a_fp=null) |
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Manifest parser for ILIAS standard export files
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 24 of file class.ilDataSetImportParser.php.
◆ __construct()
ilDataSetImportParser::__construct |
( |
string |
$a_top_entity, |
|
|
string |
$a_schema_version, |
|
|
string |
$a_xml, |
|
|
ilDataSet |
$a_ds, |
|
|
ilImportMapping |
$a_mapping |
|
) |
| |
◆ getCurrentInstallationId()
ilDataSetImportParser::getCurrentInstallationId |
( |
| ) |
|
◆ handleBeginTag()
ilDataSetImportParser::handleBeginTag |
( |
|
$a_xml_parser, |
|
|
string |
$a_name, |
|
|
array |
$a_attribs |
|
) |
| |
Definition at line 76 of file class.ilDataSetImportParser.php.
Referenced by setHandlers().
82 case $this->dspref .
"DataSet":
84 $this->current_installation_id = $a_attribs[
"InstallationId"];
85 $this->ds->setCurrentInstallationId($a_attribs[
"InstallationId"]);
88 case $this->dspref .
"Types":
89 $this->current_entity = $a_attribs[
"Entity"];
90 $this->current_version = $a_attribs[
"Version"];
93 case $this->dspref .
"FieldType":
94 $this->current_ftypes[$a_attribs[
"Name"]] =
98 case $this->dspref .
"Rec":
99 $this->current_entity = $a_attribs[
"Entity"];
100 $this->in_record =
true;
101 $this->current_field_values = array();
105 if ($this->in_record) {
106 $field = explode(
":", $a_name);
107 $field = $field[count($field) - 1];
108 $this->current_field = $field;
◆ handleCharacterData()
ilDataSetImportParser::handleCharacterData |
( |
|
$a_xml_parser, |
|
|
string |
$a_data |
|
) |
| |
◆ handleEndTag()
ilDataSetImportParser::handleEndTag |
( |
|
$a_xml_parser, |
|
|
string |
$a_name |
|
) |
| |
Definition at line 113 of file class.ilDataSetImportParser.php.
References $chr_data, $current_entity, and $current_field.
Referenced by setHandlers().
118 case $this->dspref .
"Types":
121 "version" => $this->current_version,
122 "types" => $this->current_ftypes
124 $this->current_ftypes = array();
125 $this->current_entity =
"";
126 $this->current_version =
"";
129 case $this->dspref .
"Rec":
130 $this->ds->importRecord(
131 $this->current_entity,
132 $this->entities[$this->current_entity][
"types"] ?? [],
133 $this->current_field_values,
135 $this->schema_version
137 $this->in_record =
false;
138 $this->current_entity =
"";
139 $this->current_field_values = array();
143 if ($this->in_record && $this->current_field !==
"") {
147 $this->current_field =
"";
151 $this->chr_data =
"";
◆ setHandlers()
ilDataSetImportParser::setHandlers |
( |
|
$a_xml_parser | ) |
|
◆ $chr_data
string ilDataSetImportParser::$chr_data = "" |
|
protected |
◆ $current_entity
string ilDataSetImportParser::$current_entity = "" |
|
protected |
◆ $current_field
string ilDataSetImportParser::$current_field = "" |
|
protected |
◆ $current_field_values
array ilDataSetImportParser::$current_field_values = array() |
|
protected |
◆ $current_ftypes
array ilDataSetImportParser::$current_ftypes = array() |
|
protected |
◆ $current_installation_id
string ilDataSetImportParser::$current_installation_id = "" |
|
protected |
◆ $current_version
string ilDataSetImportParser::$current_version = "" |
|
protected |
◆ $ds
◆ $dspref
string ilDataSetImportParser::$dspref |
|
protected |
◆ $entities
array ilDataSetImportParser::$entities = array() |
|
protected |
◆ $entities_sent
bool ilDataSetImportParser::$entities_sent = false |
|
protected |
◆ $import
◆ $in_record
bool ilDataSetImportParser::$in_record = false |
|
protected |
◆ $mapping
◆ $schema_version
string ilDataSetImportParser::$schema_version |
|
protected |
◆ $top_entity
string ilDataSetImportParser::$top_entity |
|
protected |
The documentation for this class was generated from the following file: