1 | <?php |
||
20 | class APNS extends MessageBase |
||
21 | { |
||
22 | /** |
||
23 | * APNs does not support multicast sending |
||
24 | */ |
||
25 | const MAX_RECIPIENTS_PER_MESSAGE_COUNT = 1; |
||
26 | |||
27 | /** |
||
28 | * The message’s priority. Provide one of the following values: |
||
29 | * - 10 The push message is sent immediately |
||
30 | * - 5 The push message is sent at a time that conserves power on the device receiving it |
||
31 | * |
||
32 | * @var integer |
||
33 | */ |
||
34 | protected $priority; |
||
35 | |||
36 | /** |
||
37 | * Message text of an alert |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | private $alert; |
||
42 | |||
43 | /** |
||
44 | * Alert dictionary |
||
45 | * |
||
46 | * @var APNSAlert|null |
||
47 | */ |
||
48 | private $alertDictionary; |
||
49 | |||
50 | /** |
||
51 | * The number to display as the badge of the application icon |
||
52 | * |
||
53 | * @var integer |
||
54 | */ |
||
55 | private $badge; |
||
56 | |||
57 | /** |
||
58 | * The name of a sound file in the application bundle |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | private $sound; |
||
63 | |||
64 | /** |
||
65 | * Category option for custom notification actions (iOS 8+) |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | private $category; |
||
70 | |||
71 | /** |
||
72 | * Provide this key with a value of 1 to indicate that new content is available |
||
73 | * |
||
74 | * @var bool |
||
75 | */ |
||
76 | private $contentAvailable; |
||
77 | |||
78 | /** |
||
79 | * Custom properties |
||
80 | * |
||
81 | * @var array |
||
82 | */ |
||
83 | private $customPayloadData = array(); |
||
84 | |||
85 | /** |
||
86 | * Safari url args |
||
87 | * |
||
88 | * @var array |
||
89 | */ |
||
90 | private $urlArgs; |
||
91 | |||
92 | /** |
||
93 | * @var bool |
||
94 | */ |
||
95 | private $mutableContent; |
||
96 | |||
97 | /** |
||
98 | * Gets message type |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getMessageType() |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getAlert() |
||
114 | |||
115 | /** |
||
116 | * @param string $alert |
||
117 | * @return $this |
||
118 | */ |
||
119 | public function setAlert($alert) |
||
128 | |||
129 | /** |
||
130 | * @return APNSAlert|null |
||
131 | */ |
||
132 | public function getAlertDictionary() |
||
136 | |||
137 | /** |
||
138 | * @param APNSAlert $alertDictionary |
||
139 | * @return APNS |
||
140 | */ |
||
141 | public function setAlertDictionary(APNSAlert $alertDictionary) |
||
146 | |||
147 | /** |
||
148 | * @return int |
||
149 | */ |
||
150 | public function getBadge() |
||
154 | |||
155 | /** |
||
156 | * @param int $badge |
||
157 | * @return $this |
||
158 | */ |
||
159 | public function setBadge($badge) |
||
169 | |||
170 | /** |
||
171 | * @return array |
||
172 | */ |
||
173 | public function getCustomPayloadData() |
||
177 | |||
178 | /** |
||
179 | * @param array $customPayloadData |
||
180 | */ |
||
181 | public function setCustomPayloadData($customPayloadData) |
||
185 | |||
186 | /** |
||
187 | * @return boolean |
||
188 | */ |
||
189 | public function isContentAvailable() |
||
193 | |||
194 | /** |
||
195 | * @param boolean $contentAvailable |
||
196 | * @return $this |
||
197 | */ |
||
198 | public function setContentAvailable($contentAvailable) |
||
208 | |||
209 | /** |
||
210 | * @return int |
||
211 | */ |
||
212 | public function getPriority() |
||
216 | |||
217 | /** |
||
218 | * @param int $priority |
||
219 | */ |
||
220 | public function setPriority($priority) |
||
224 | |||
225 | /** |
||
226 | * @return string |
||
227 | */ |
||
228 | public function getSound() |
||
232 | |||
233 | /** |
||
234 | * @param string $sound |
||
235 | * @return $this |
||
236 | */ |
||
237 | public function setSound($sound) |
||
246 | |||
247 | /** |
||
248 | * @return string |
||
249 | */ |
||
250 | public function getCategory() |
||
254 | |||
255 | /** |
||
256 | * @param string $category |
||
257 | * @return $this |
||
258 | */ |
||
259 | public function setCategory($category) |
||
268 | |||
269 | /** |
||
270 | * @return array |
||
271 | */ |
||
272 | public function getUrlArgs() |
||
276 | |||
277 | /** |
||
278 | * @param array $urlArgs |
||
279 | * @return $this |
||
280 | */ |
||
281 | public function setUrlArgs($urlArgs) |
||
286 | |||
287 | /** |
||
288 | * @return boolean |
||
289 | */ |
||
290 | public function isMutableContent() |
||
294 | |||
295 | /** |
||
296 | * @param boolean $mutableContent |
||
297 | * @return $this |
||
298 | */ |
||
299 | public function setMutableContent($mutableContent) |
||
304 | |||
305 | /** |
||
306 | * {@inheritdoc} |
||
307 | */ |
||
308 | public function validateRecipient($token) |
||
325 | } |
||
326 |