1 | <?php |
||
13 | class Statistics implements ListenerProviderInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var NotificationRepository |
||
17 | */ |
||
18 | protected $notificationRepository; |
||
19 | |||
20 | /** |
||
21 | * Create a new StatisticsStorage. |
||
22 | * |
||
23 | * @param NotificationRepository $notificationRepository |
||
24 | */ |
||
25 | 14 | public function __construct(NotificationRepository $notificationRepository) |
|
29 | |||
30 | /** |
||
31 | * Number of sent pushes. |
||
32 | * |
||
33 | * @param NotificationSent $event |
||
34 | */ |
||
35 | 1 | public function sent(NotificationSent $event) |
|
39 | |||
40 | /** |
||
41 | * Number of delivered pushes. |
||
42 | * |
||
43 | * @param NotificationDelivered $event |
||
44 | */ |
||
45 | 1 | public function delivered(NotificationDelivered $event) |
|
49 | |||
50 | /** |
||
51 | * Number of clicked pushes. |
||
52 | * |
||
53 | * @param NotificationClicked $event |
||
54 | */ |
||
55 | 1 | public function clicked(NotificationClicked $event) |
|
59 | |||
60 | /** |
||
61 | * Number of failed pushes. |
||
62 | * |
||
63 | * @param NotificationFailed $event |
||
64 | */ |
||
65 | 4 | public function failed(NotificationFailed $event) |
|
69 | |||
70 | /** |
||
71 | * Provide event. |
||
72 | * |
||
73 | * @param ListenerAcceptorInterface $listener |
||
74 | * @return $this |
||
75 | */ |
||
76 | 9 | public function provideListeners(ListenerAcceptorInterface $listener) |
|
93 | } |
||
94 |