1 | <?php |
||
24 | class ReadStatusMessageEvent extends Event |
||
25 | { |
||
26 | /** |
||
27 | * The message from whom the read status has changed. |
||
28 | * |
||
29 | * @var MessageInterface |
||
30 | */ |
||
31 | protected $message; |
||
32 | |||
33 | /** |
||
34 | * The participant from whom the read status has changed. |
||
35 | * |
||
36 | * @var ParticipantInterface |
||
37 | */ |
||
38 | protected $participant; |
||
39 | |||
40 | /** |
||
41 | * Constructor. |
||
42 | * |
||
43 | * @param MessageInterface $message |
||
44 | * @param ParticipantInterface $participant |
||
45 | */ |
||
46 | public function __construct(MessageInterface $message, ParticipantInterface $participant) |
||
51 | |||
52 | /** |
||
53 | * Gets the message where the read status has changed. |
||
54 | * |
||
55 | * @return MessageInterface |
||
56 | */ |
||
57 | public function getMessage() |
||
61 | |||
62 | /** |
||
63 | * Gets the thread for the given message. |
||
64 | * |
||
65 | * @return ThreadInterface |
||
66 | */ |
||
67 | public function getThread() |
||
71 | |||
72 | /** |
||
73 | * Gets the old read status. |
||
74 | * |
||
75 | * @return integer one of MessageInterface read status constants |
||
76 | */ |
||
77 | public function getPreviousReadStatus() |
||
81 | |||
82 | /** |
||
83 | * Gets the new read status. |
||
84 | * |
||
85 | * @return integer one of MessageInterface read status constants |
||
86 | */ |
||
87 | public function getReadStatus() |
||
91 | |||
92 | /** |
||
93 | * Returns whether the message has been read for the first time by the given participant. |
||
94 | * |
||
95 | * @return boolean true if read for the first time, false otherwise |
||
96 | */ |
||
97 | public function isFirstTimeRead() |
||
107 | |||
108 | /** |
||
109 | * Gets the participant for whom the read status of the message has changed. |
||
110 | * |
||
111 | * @return ParticipantInterface The participant for whom the message read status has changed. |
||
112 | */ |
||
113 | public function getParticipant() |
||
117 | } |
||
118 |