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']; }
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']; }
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']); }
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); }
public function __construct(array $data, string $host) { parent::__construct($data, $host); }
public function __construct(array $data, ChatRoom $room) { parent::__construct($data, $room->getIdentifier()->getHost()); }