19 declare(strict_types=1);
41 $this->room->setSetting(
'object_id', $this->chat->getId());
45 $this->
setXMLContent(
'<?xml version="1.0" encoding="utf-8"?>' . $a_xml_data);
50 $this->import_install_id =
$id;
65 xml_set_object($a_xml_parser, $this);
73 public function handlerBeginTag(XMLParser $a_xml_parser,
string $a_name, array $a_attribs): void
77 $this->in_messages =
true;
82 public function handlerEndTag(XMLParser $a_xml_parser,
string $a_name): void
84 $this->cdata = trim($this->cdata);
96 $this->chat->setOfflineStatus(
97 ((
int) $this->cdata) === 0
101 case 'AllowAnonymousAccess':
102 $this->room->setSetting(
'allow_anonymous', (
int) $this->cdata);
105 case 'AllowCustomUsernames':
106 $this->room->setSetting(
'allow_custom_usernames', (
int) $this->cdata);
109 case 'EnableHistory':
110 $this->room->setSetting(
'enable_history', (
int) $this->cdata);
113 case 'DisplayPastMessages':
114 $this->room->setSetting(
'display_past_msgs', (
int) $this->cdata);
117 case 'AutoGeneratedUsernameSchema':
122 $this->exportRoomId = (
int) $this->cdata;
125 case 'CreatedTimestamp':
126 $this->timestamp = (
int) $this->cdata;
138 $message = json_decode($this->message,
true, 512, JSON_THROW_ON_ERROR);
139 if (is_array($message)) {
140 $message[
'roomId'] = $this->room->getRoomId();
143 $this->room->addHistoryEntry($message);
147 $this->timestamp = 0;
148 $this->in_messages =
false;
153 $this->chat->setOfflineStatus(
true);
154 $this->chat->update();
164 if ($a_data !==
"\n") {
165 $this->cdata .= preg_replace(
"/\t+/",
' ', $a_data);
string $import_install_id
setHandlers($a_xml_parser)
handlerCharacterData(XMLParser $a_xml_parser, string $a_data)
setImportInstallId(?string $id)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
__construct(protected ilObjChatroom $chat, string $a_xml_data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
handlerEndTag(XMLParser $a_xml_parser, string $a_name)
handlerBeginTag(XMLParser $a_xml_parser, string $a_name, array $a_attribs)
static byObjectId(int $object_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setXMLContent(string $a_xml_content)