1 | <?php |
||
11 | class Notification |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var null|string |
||
16 | */ |
||
17 | protected $title; |
||
18 | |||
19 | /** |
||
20 | * @var null|string |
||
21 | */ |
||
22 | protected $body; |
||
23 | |||
24 | /** |
||
25 | * @var null|string |
||
26 | */ |
||
27 | protected $sound; |
||
28 | |||
29 | /** |
||
30 | * @var null|string |
||
31 | */ |
||
32 | protected $badge; |
||
33 | |||
34 | /** |
||
35 | * @var null|string |
||
36 | */ |
||
37 | protected $icon; |
||
38 | |||
39 | /** |
||
40 | * @var null|string |
||
41 | */ |
||
42 | protected $tag; |
||
43 | |||
44 | /** |
||
45 | * @var null|string |
||
46 | */ |
||
47 | protected $color; |
||
48 | |||
49 | /** |
||
50 | * @var null|string |
||
51 | */ |
||
52 | protected $clickAction; |
||
53 | |||
54 | /** |
||
55 | * @var null|string |
||
56 | */ |
||
57 | protected $bodyLocalizationKey; |
||
58 | |||
59 | /** |
||
60 | * @var null|string |
||
61 | */ |
||
62 | protected $bodyLocalizationArgs; |
||
63 | |||
64 | /** |
||
65 | * @var null|string |
||
66 | */ |
||
67 | protected $titleLocalizationKey; |
||
68 | |||
69 | /** |
||
70 | * @var null|string |
||
71 | */ |
||
72 | protected $titleLocalizationArgs; |
||
73 | |||
74 | /** |
||
75 | * Notification constructor. |
||
76 | * @param array|NotificationBuilder $notificationBuilder |
||
77 | */ |
||
78 | public function __construct($notificationBuilder) |
||
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | public function build() |
||
120 | |||
121 | /** |
||
122 | * @param array $notificationArray |
||
123 | * @return \ker0x\Push\Adapter\Fcm\Message\NotificationBuilder |
||
124 | * @throws \ker0x\Push\Adapter\Fcm\Message\Exception\InvalidNotificationException |
||
125 | */ |
||
126 | private function fromArray(array $notificationArray): NotificationBuilder |
||
142 | } |