Manifest parser for ILIAS standard export files.
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) |
|
Manifest parser for ILIAS standard export files.
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 21 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 74 of file class.ilDataSetImportParser.php.
80 case $this->dspref .
"DataSet":
82 $this->current_installation_id = $a_attribs[
"InstallationId"];
83 $this->ds->setCurrentInstallationId($a_attribs[
"InstallationId"]);
86 case $this->dspref .
"Types":
87 $this->current_entity = $a_attribs[
"Entity"];
88 $this->current_version = $a_attribs[
"Version"];
91 case $this->dspref .
"FieldType":
92 $this->current_ftypes[$a_attribs[
"Name"]] =
96 case $this->dspref .
"Rec":
97 $this->current_entity = $a_attribs[
"Entity"];
98 $this->in_record =
true;
99 $this->current_field_values = array();
103 if ($this->in_record) {
104 $field = explode(
":", $a_name);
105 $field = $field[count($field) - 1];
106 $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 111 of file class.ilDataSetImportParser.php.
References $chr_data, $current_entity, and $current_field.
116 case $this->dspref .
"Types":
119 "version" => $this->current_version,
120 "types" => $this->current_ftypes
122 $this->current_ftypes = array();
123 $this->current_entity =
"";
124 $this->current_version =
"";
127 case $this->dspref .
"Rec":
128 $this->ds->importRecord(
129 $this->current_entity,
130 $this->entities[$this->current_entity][
"types"] ?? [],
131 $this->current_field_values,
133 $this->schema_version
135 $this->in_record =
false;
136 $this->current_entity =
"";
137 $this->current_field_values = array();
141 if ($this->in_record && $this->current_field !==
"") {
145 $this->current_field =
"";
149 $this->chr_data =
"";
◆ setHandlers()
ilDataSetImportParser::setHandlers |
( |
|
$a_xml_parser | ) |
|
Definition at line 66 of file class.ilDataSetImportParser.php.
68 xml_set_object($a_xml_parser, $this);
69 xml_set_element_handler($a_xml_parser,
'handleBeginTag',
'handleEndTag');
70 xml_set_character_data_handler($a_xml_parser,
'handleCharacterData');
◆ $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
ilImport ilDataSetImportParser::$import = null |
|
protected |
◆ $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: