예제 #1
0
 public function __construct(array $data, ChatRoom $room)
 {
     parent::__construct($data, $room->getIdentifier()->getHost());
     $this->room = $room;
     $this->userId = $data['user_id'];
     $this->userName = $data['user_name'];
 }
예제 #2
0
 public function __construct(array $data, ChatRoom $room)
 {
     parent::__construct($data, $room->getIdentifier()->getHost());
     $this->userId = (int) $data['user_id'];
     $this->userName = (string) $data['user_name'];
     $this->roomId = (int) $data['room_id'];
     $this->roomName = (string) $data['room_name'];
 }
예제 #3
0
 public function __construct(array $data, ChatRoom $room)
 {
     parent::__construct($data, $room->getIdentifier()->getHost());
     $this->room = $room;
     $this->messageId = $data['message_id'];
     $this->content = $data['content'];
     $this->numberOfStars = $data['message_stars'] ?? 0;
     $this->pinned = isset($data['message_owner_stars']);
 }
예제 #4
0
 public function __construct(array $data, ChatRoom $room)
 {
     parent::__construct($data, $room->getIdentifier()->getHost());
     $this->room = $room;
     $this->userId = (int) $data['user_id'];
     $this->userName = (string) $data['user_name'];
     $this->messageId = (int) $data['message_id'];
     $this->messageContent = domdocument_load_html((string) ($data['content'] ?? ''), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
     $this->parentId = (int) ($data['parent_id'] ?? -1);
     $this->showParent = (bool) ($data['show_parent'] ?? false);
 }
예제 #5
0
 public function testGetTimestamp()
 {
     $timestamp = $this->event->getTimestamp();
     $this->assertInstanceOf(\DateTimeImmutable::class, $timestamp);
     $this->assertSame('1970-01-01 00:16:45', $timestamp->format('Y-m-d H:i:s'));
 }
예제 #6
0
파일: Unknown.php 프로젝트: Room-11/Jeeves
 public function __construct(array $data, ChatRoom $room)
 {
     parent::__construct($data, $room->getIdentifier()->getHost());
 }