19 declare(strict_types=1);
58 $this->ls_item_data = [];
60 $this->lp_settings = [];
61 $this->lp_settings[
"lp_item_ref_ids"] = [];
82 xml_set_object($a_xml_parser, $this);
83 xml_set_element_handler($a_xml_parser,
"handleBeginTag",
"handleEndTag");
84 xml_set_character_data_handler($a_xml_parser,
'handleCharacterData');
92 $this->actual_name = $name;
96 $this->
object[
"ref_id"] = $attributes[
"ref_id"];
97 $this->
settings[
"members_gallery"] = $attributes[
'members_gallery'];
99 case Writer::TAG_LPSETTING:
100 $this->lp_settings[
"lp_type"] = $attributes[
'type'];
101 $this->lp_settings[
"lp_mode"] = $attributes[
'mode'];
102 $this->lp_settings[
"lp_item_ref_ids"] = [];
105 case Writer::TAG_LSITEM:
106 $this->counter = (
int)$attributes[
"ref_id"];
107 $this->ls_item_data[
$this->counter][
"ref_id"] = $attributes[
"ref_id"];
110 case Writer::TAG_CONDITION:
111 $this->ls_item_data[
$this->counter][
"condition_type"] = $attributes[
"type"];
115 case Writer::TAG_CONTAINERSETTING:
116 $this->current_container_setting = $attributes[
'id'];
126 $this->cdata = trim($this->cdata);
129 case Writer::TAG_LPREFID:
130 $this->lp_settings[
"lp_item_ref_ids"][] = trim($this->cdata);
132 case Writer::TAG_CONTAINERSETTING:
133 if ($this->current_container_setting) {
142 case Writer::TAG_TITLE:
143 $this->obj->setTitle(trim($this->cdata));
146 case Writer::TAG_DESCRIPTION:
147 $this->obj->setDescription(trim($this->cdata));
159 $this->cdata .= (
$data ??
"");
handleCharacterData($parser, $data)
startParsing()
stores xml data in array
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(protected ilObjLearningSequence $obj, string $xml)
string $current_container_setting
handleBeginTag( $parser, string $name, array $attributes)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
handleEndTag($parser, string $name)
setXMLContent(string $a_xml_content)
setHandlers($a_xml_parser)