1 | <?php |
||
9 | final class AsgardNotification implements Notification |
||
10 | { |
||
11 | /** |
||
12 | * @var NotificationRepository |
||
13 | */ |
||
14 | private $notification; |
||
15 | /** |
||
16 | * @var Authentication |
||
17 | */ |
||
18 | private $auth; |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $userId; |
||
23 | |||
24 | public function __construct(NotificationRepository $notification, Authentication $auth) |
||
29 | |||
30 | /** |
||
31 | * Push a notification on the dashboard |
||
32 | * @param string $title |
||
33 | * @param string $message |
||
34 | * @param string $icon |
||
35 | * @param string|null $link |
||
36 | */ |
||
37 | public function push($title, $message, $icon, $link = null) |
||
51 | |||
52 | /** |
||
53 | * Trigger the broadcast event for the given notification |
||
54 | * @param \Modules\Notification\Entities\Notification $notification |
||
55 | */ |
||
56 | private function triggerEventFor(\Modules\Notification\Entities\Notification $notification) |
||
60 | |||
61 | /** |
||
62 | * Set a user id to set the notification to |
||
63 | * @param int $userId |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function to($userId) |
||
72 | } |
||
73 |