1 | <?php |
||
30 | class ReadStatusManagerEventAware implements ReadStatusManagerInterface |
||
31 | { |
||
32 | /** |
||
33 | * A read status manager instance. |
||
34 | * |
||
35 | * @var ReadStatusManagerInterface |
||
36 | */ |
||
37 | private $readStatusManager; |
||
38 | |||
39 | /** |
||
40 | * An event dispatcher instance. |
||
41 | * |
||
42 | * @var EventDispatcherInterface |
||
43 | */ |
||
44 | private $eventDispatcher; |
||
45 | |||
46 | /** |
||
47 | * Constructor. |
||
48 | * |
||
49 | * @param ReadStatusManagerInterface $readStatusManager |
||
50 | * @param EventDispatcherInterface $eventDispatcher |
||
51 | */ |
||
52 | public function __construct( |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function updateReadStatusForMessageCollection( |
||
79 | |||
80 | /** |
||
81 | * Looping over the updated messages (if any) and dispatching them. |
||
82 | * |
||
83 | * @param MessageInterface[]|[] $updatedMessages An array with message interfaces or an empty array if none updated |
||
84 | * @param ParticipantInterface $participant The participant for whom we updated the messages |
||
85 | */ |
||
86 | protected function maybeDispatchMessages($updatedMessages, $participant) |
||
92 | |||
93 | /** |
||
94 | * Dispatch a read status changed event. |
||
95 | * |
||
96 | * @param MessageInterface $message The message whom read status is changed for the participant |
||
97 | * @param ParticipantInterface $participant The participant for whom the read status is changed. |
||
98 | */ |
||
99 | protected function dispatchMessage(MessageInterface $message, ParticipantInterface $participant) |
||
104 | } |
||
105 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.