1 | <?php |
||
7 | class Notification implements NotificationContract |
||
8 | { |
||
9 | /** |
||
10 | * Message. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $message; |
||
15 | |||
16 | /** |
||
17 | * Data. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $data; |
||
22 | |||
23 | /** |
||
24 | * Devices. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $devices; |
||
29 | |||
30 | /** |
||
31 | * Construct. |
||
32 | */ |
||
33 | public function __construct() |
||
38 | |||
39 | /** |
||
40 | * Set the notification's message. |
||
41 | * |
||
42 | * @param string $message |
||
43 | * |
||
44 | * @return self |
||
45 | */ |
||
46 | public function setMessage($message) |
||
52 | |||
53 | /** |
||
54 | * Get notification's message. |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getMessage() |
||
62 | |||
63 | /** |
||
64 | * Set the notification's data. |
||
65 | * |
||
66 | * @param array $data |
||
67 | * |
||
68 | * @return self |
||
69 | */ |
||
70 | public function setData(array $data) |
||
76 | |||
77 | /** |
||
78 | * Get notification's data. |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getData() |
||
86 | |||
87 | /** |
||
88 | * Add a platform to the notification. |
||
89 | * |
||
90 | * @param string $platform |
||
91 | * @param array $platform |
||
92 | * @param array $options Optional |
||
93 | * |
||
94 | * @return self |
||
95 | */ |
||
96 | public function addDevices($platform, array $devices, array $options = []) |
||
109 | |||
110 | /** |
||
111 | * Get devices tokens. |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | public function getDevices() |
||
119 | |||
120 | /** |
||
121 | * Get targeted platforms. |
||
122 | * |
||
123 | * @return array |
||
124 | */ |
||
125 | public function getTargetedPlatforms() |
||
129 | } |
||
130 |