49 xml_set_object($a_xml_parser, $this);
50 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
51 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
60 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs) : void
64 $this->mail = array();
65 $this->mail[
'usePlaceholders'] = (bool) $a_attribs[
'usePlaceholders'];
66 $this->mail[
'type'] = $a_attribs[
'type'] ===
'System' ?
'system' :
'normal';
70 $this->mail[
'to'] = $this->
parseName($a_attribs);
74 $this->mail[
'cc'] = $this->
parseName($a_attribs);
78 $this->mail[
'bcc'] = $this->
parseName($a_attribs);
85 $this->lines = array();
90 $this->
attachment[
'name'] = $a_attribs[
'name'];
117 $this->lines[] = trim($this->cdata);
121 $this->
attachment[
'content'] = base64_decode(trim($this->cdata));
136 if ($a_data !==
"\n") {
138 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
139 $this->cdata .= $a_data;
145 if ($a_attribs[
'obj_id']) {
146 $il_id = explode(
'_', $a_attribs[
'obj_id']);
150 return $user->getLogin();
152 return (
string) ($a_attribs[
'name'] ??
'');
setThrowException(bool $throw_exception)
handlerCharacterData($a_xml_parser, string $a_data)
startParsing()
stores xml data in array
handlerEndTag($a_xml_parser, string $a_name)
Handler for end of element.
parseName(array $a_attribs)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
XML parser for soap mails.
__construct(string $a_xml)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
__construct(Container $dic, ilPlugin $plugin)
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handler for begin of element
setHandlers($a_xml_parser)
Set event handlers.
setXMLContent(string $a_xml_content)