5 include_once
'./Services/Xml/classes/class.ilSaxParser.php';
6 include_once
'./Services/User/classes/class.ilObjUser.php';
23 parent::__construct(
'',
true);
34 return (array) $this->mails;
59 xml_set_object($a_xml_parser, $this);
60 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
61 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
75 $this->
mail = array();
76 $this->
mail[
'usePlaceholders'] = $a_attribs[
'usePlaceholders'] ? true :
false;
77 $this->
mail[
'type'] = $a_attribs[
'type'] ==
'System' ?
'system' :
'normal';
96 $this->lines = array();
101 $this->
attachment[
'name'] = $a_attribs[
'name'];
117 $this->mails[] = $this->mail;
121 $this->
mail[
'subject'] = $this->cdata;
125 $this->
mail[
'body'] = (array) $this->lines;
129 $this->lines[] = trim($this->cdata);
133 $this->
attachment[
'content'] = base64_decode(trim($this->cdata));
134 $this->
mail[
'attachments'][] = $this->attachment;
149 if ($this->in_metadata) {
150 parent::handlerCharacterData($a_xml_parser, $a_data);
153 if ($a_data !=
"\n") {
155 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
156 $this->cdata .= $a_data;
168 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
170 if ($a_attribs[
'obj_id']) {
171 $il_id = explode(
'_', $a_attribs[
'obj_id']);
172 $GLOBALS[
'DIC'][
'ilLog']->write(
'il ID:' . print_r($il_id,
true));
176 return $user->getLogin();
178 return $a_attribs[
'name'];
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
startParsing()
stores xml data in array
setThrowException($throwException)
set error handling
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
__construct($a_xml)
Constructor.
XML parser for soap mails.
parseName($a_attribs)
extract user name
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getMails()
Get parsed mails.
setXMLContent($a_xml_content)
setHandlers($a_xml_parser)
set event handlers
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
handlerCharacterData($a_xml_parser, $a_data)
handler for character data