24 require_once(
"./Services/Xml/classes/class.ilSaxParser.php");
25 require_once(
'./Services/User/classes/class.ilObjUser.php');
26 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
73 $this->error = $DIC[
"ilErr"];
74 parent::__construct(null);
79 $this->logger = $DIC->logger()->exp();
87 $this->import_mapping = $mapping;
106 xml_set_object($a_xml_parser, $this);
107 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
108 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
116 parent::startParsing();
133 case "ContainerReference":
137 switch ($a_attribs[
'type']) {
151 $this->logger->debug(
'Using mapped target_id: ' .
$target_id);
154 $this->logger->info(
'No mapping found for: ' . $a_attribs[
'id']);
167 if (!strlen($attribute_target)) {
168 $this->logger->debug(
'No target id provided');
174 $obj_mapping_id = $this->import_mapping->getMapping(
'Services/Container',
'objs', $attribute_target);
175 if (!$obj_mapping_id) {
176 $this->logger->debug(
'Cannot find object mapping for target_id: ' . $attribute_target);
179 return $obj_mapping_id;
191 case "ContainerReference":
210 #$a_data = str_replace("<","<",$a_data); 211 #$a_data = str_replace(">",">",$a_data); 213 if (!empty($a_data)) {
214 $this->cdata .= $a_data;
227 include_once
'./Modules/Category/classes/class.ilCategoryXmlParser.php';
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class private
handlerEndTag($a_xml_parser, $a_name)
Handler end tag.
save()
Save category object.
setReference(ilContainerReference $ref)
Set container reference.
parseTargetId(string $attribute_target)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
startParsing()
start the parser
getReference()
Get container reference.
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
__construct($a_xml, $a_parent_id=0)
Constructor.
setImportMapping(ilImportMapping $mapping)
getParentId()
Get parent id.
setXMLContent($a_xml_content)
setMode($mode)
Set import mode.