3 declare(strict_types=1);
43 public function __construct(
string $a_file,
object $a_callback_obj,
string $a_callback_func)
45 $this->callback_obj = $a_callback_obj;
46 $this->callback_func = $a_callback_func;
57 xml_set_object($a_xml_parser, $this);
58 xml_set_element_handler($a_xml_parser,
'handleBeginTag',
'handleEndTag');
59 xml_set_character_data_handler($a_xml_parser,
'handleCharacterData');
67 parent::startParsing();
70 public function handleBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
72 if ($this->in_export_item) {
73 $this->export_item_writer->xmlStartTag($a_name, $a_attribs);
78 $this->entity = $a_attribs[
"Entity"];
79 $this->install_id = $a_attribs[
"InstallationId"];
80 $this->install_url = $a_attribs[
"InstallationUrl"];
81 $this->schema_version = $a_attribs[
"SchemaVersion"];
84 case "exp:ExportItem":
85 $this->in_export_item =
true;
86 $this->current_id = $a_attribs[
"Id"];
89 $this->expfiles[] = array(
90 "component" => $a_attribs[
"Component"] ?? null,
91 "path" => $a_attribs[
"Path"] ?? null
100 case "exp:ExportItem":
101 $this->in_export_item =
false;
103 $this->callback_obj->$cf(
105 $this->schema_version,
107 $this->export_item_writer->xmlDumpMem(
false),
115 if ($this->in_export_item) {
116 $this->export_item_writer->xmlEndTag($a_name);
119 $this->chr_data =
"";
127 $this->chr_data .= $a_data;
128 if ($this->in_export_item) {
129 $this->export_item_writer->xmlData($a_data);
handleCharacterData($a_xml_parser, string $a_data)
End Tag.
handleBeginTag($a_xml_parser, string $a_name, array $a_attribs)
ilXmlWriter $export_item_writer
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setHandlers($a_xml_parser)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(string $a_file, object $a_callback_obj, string $a_callback_func)
ilExportFileParser constructor.
handleEndTag($a_xml_parser, string $a_name)
__construct(Container $dic, ilPlugin $plugin)