1 | <?php |
||
19 | class Aps |
||
20 | { |
||
21 | /** |
||
22 | * @var Alert |
||
23 | */ |
||
24 | private $alert; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $badge = 0; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $sound = ''; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | private $contentAvailable = false; |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | private $mutableContent = false; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private $category = ''; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | private $threadId = ''; |
||
55 | |||
56 | /** |
||
57 | * Constructor. |
||
58 | * |
||
59 | * @param Alert $alert |
||
60 | */ |
||
61 | public function __construct(Alert $alert) |
||
65 | |||
66 | /** |
||
67 | * Set alert |
||
68 | * |
||
69 | * @param Alert $alert |
||
70 | * |
||
71 | * @return Aps |
||
72 | */ |
||
73 | public function withAlert(Alert $alert): Aps |
||
81 | |||
82 | /** |
||
83 | * Get alert data |
||
84 | * |
||
85 | * @return Alert |
||
86 | */ |
||
87 | public function getAlert(): Alert |
||
91 | |||
92 | /** |
||
93 | * Set category |
||
94 | * |
||
95 | * @param string $category |
||
96 | * |
||
97 | * @return Aps |
||
98 | */ |
||
99 | public function withCategory(string $category): Aps |
||
107 | |||
108 | /** |
||
109 | * Get category |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | public function getCategory(): string |
||
117 | |||
118 | /** |
||
119 | * Set sound |
||
120 | * |
||
121 | * @param string $sound |
||
122 | * |
||
123 | * @return Aps |
||
124 | */ |
||
125 | public function withSound(string $sound): Aps |
||
133 | |||
134 | /** |
||
135 | * Get sound |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getSound(): string |
||
143 | |||
144 | /** |
||
145 | * Set badge |
||
146 | * |
||
147 | * @param int $badge |
||
148 | * |
||
149 | * @return Aps |
||
150 | */ |
||
151 | public function withBadge(int $badge): Aps |
||
159 | |||
160 | /** |
||
161 | * Get badge |
||
162 | * |
||
163 | * @return int |
||
164 | */ |
||
165 | public function getBadge(): int |
||
169 | |||
170 | /** |
||
171 | * Set content available option |
||
172 | * |
||
173 | * @param bool $contentAvailable |
||
174 | * |
||
175 | * @return Aps |
||
176 | */ |
||
177 | public function withContentAvailable(bool $contentAvailable): Aps |
||
185 | |||
186 | /** |
||
187 | * Get content available option |
||
188 | * |
||
189 | * @return bool |
||
190 | */ |
||
191 | public function isContentAvailable(): bool |
||
195 | |||
196 | /** |
||
197 | * Set mutable content option |
||
198 | * |
||
199 | * @param bool $mutableContent |
||
200 | * |
||
201 | * @return Aps |
||
202 | */ |
||
203 | public function withMutableContent(bool $mutableContent): Aps |
||
211 | |||
212 | /** |
||
213 | * Get mutable content option |
||
214 | * |
||
215 | * @return bool |
||
216 | */ |
||
217 | public function isMutableContent(): bool |
||
221 | |||
222 | /** |
||
223 | * Set thread id |
||
224 | * |
||
225 | * @param string $threadId |
||
226 | * |
||
227 | * @return Aps |
||
228 | */ |
||
229 | public function withThreadId(string $threadId): Aps |
||
237 | |||
238 | /** |
||
239 | * Get thread id |
||
240 | * |
||
241 | * @return string |
||
242 | */ |
||
243 | public function getThreadId(): string |
||
247 | } |
||
248 |