19 declare(strict_types=1);
    33             $this->room->setSetting(
'object_id', $this->chat->getId());
    43         $this->
xmlElement(
'ObjId', null, (
string) $this->chat->getId());
    44         $this->
xmlElement(
'RoomId', null, (
string) $this->room->getRoomId());
    45         $this->
xmlElement(
'Title', null, $this->chat->getTitle());
    46         $this->
xmlElement(
'Description', null, $this->chat->getDescription());
    47         $this->
xmlElement(
'OnlineStatus', null, (
string) ((
int) (!$this->chat->getOfflineStatus())));
    48         $this->
xmlElement(
'AllowAnonymousAccess', null, (
string) ((
int) $this->room->getSetting(
'allow_anonymous')));
    49         $this->
xmlElement(
'AllowCustomUsernames', null, (
string) ((
int) $this->room->getSetting(
'allow_custom_usernames')));
    50         $this->
xmlElement(
'EnableHistory', null, (
string) ((
int) $this->room->getSetting(
'enable_history')));
    51         $this->
xmlElement(
'DisplayPastMessages', null, (
string) ((
int) $this->room->getSetting(
'display_past_msgs')));
    52         $this->
xmlElement(
'AutoGeneratedUsernameSchema', null, (
string) $this->room->getSetting(
'autogen_usernames'));
    54         if ($this->room->getRoomId() > 0) {
    63         $history = $this->room->getHistory(null, null, null, 
false);
    64         if (count($history) > 0) {
    66             foreach ($history as $entry) {
    68                 $this->
xmlElement(
'Body', null, json_encode($entry[
'message'], JSON_THROW_ON_ERROR));
    69                 $this->
xmlElement(
'CreatedTimestamp', null, (
string) ((
int) $entry[
'timestamp']));
    79         return str_replace(
'', 
'', $this->
xmlDumpMem(
false));
 
Class ilChatroomXMLWriter. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
__construct(protected ilObjChatroom $chat)
 
xmlEndTag(string $tag)
Writes an endtag. 
 
static byObjectId(int $object_id)
 
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag. 
 
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content) 
 
xmlDumpMem(bool $format=true)
Returns xml document from memory.