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 | * The number to display as the badge of the application icon |
||
45 | * |
||
46 | * @var integer |
||
47 | */ |
||
48 | private $badge; |
||
49 | |||
50 | /** |
||
51 | * The name of a sound file in the application bundle |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | private $sound; |
||
56 | |||
57 | /** |
||
58 | * Category option for custom notification actions (iOS 8+) |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | private $category; |
||
63 | |||
64 | /** |
||
65 | * Provide this key with a value of 1 to indicate that new content is available |
||
66 | * |
||
67 | * @var bool |
||
68 | */ |
||
69 | private $contentAvailable; |
||
70 | |||
71 | /** |
||
72 | * Custom properties |
||
73 | * |
||
74 | * @var array |
||
75 | */ |
||
76 | private $customPayloadData = array(); |
||
77 | |||
78 | /** |
||
79 | * Safari url args |
||
80 | * |
||
81 | * @var array |
||
82 | */ |
||
83 | private $urlArgs; |
||
84 | |||
85 | /** |
||
86 | * @var bool |
||
87 | */ |
||
88 | private $mutableContent; |
||
89 | |||
90 | /** |
||
91 | * Gets message type |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getMessageType() |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getAlert() |
||
107 | |||
108 | /** |
||
109 | * @param string $alert |
||
110 | * @return $this |
||
111 | */ |
||
112 | public function setAlert($alert) |
||
121 | |||
122 | /** |
||
123 | * @return int |
||
124 | */ |
||
125 | public function getBadge() |
||
129 | |||
130 | /** |
||
131 | * @param int $badge |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function setBadge($badge) |
||
144 | |||
145 | /** |
||
146 | * @return array |
||
147 | */ |
||
148 | public function getCustomPayloadData() |
||
152 | |||
153 | /** |
||
154 | * @param array $customPayloadData |
||
155 | */ |
||
156 | public function setCustomPayloadData($customPayloadData) |
||
160 | |||
161 | /** |
||
162 | * @return boolean |
||
163 | */ |
||
164 | public function isContentAvailable() |
||
168 | |||
169 | /** |
||
170 | * @param boolean $contentAvailable |
||
171 | * @return $this |
||
172 | */ |
||
173 | public function setContentAvailable($contentAvailable) |
||
183 | |||
184 | /** |
||
185 | * @return int |
||
186 | */ |
||
187 | public function getPriority() |
||
191 | |||
192 | /** |
||
193 | * @param int $priority |
||
194 | */ |
||
195 | public function setPriority($priority) |
||
199 | |||
200 | /** |
||
201 | * @return string |
||
202 | */ |
||
203 | public function getSound() |
||
207 | |||
208 | /** |
||
209 | * @param string $sound |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function setSound($sound) |
||
221 | |||
222 | /** |
||
223 | * @return string |
||
224 | */ |
||
225 | public function getCategory() |
||
229 | |||
230 | /** |
||
231 | * @param string $category |
||
232 | * @return $this |
||
233 | */ |
||
234 | public function setCategory($category) |
||
243 | |||
244 | /** |
||
245 | * @return array |
||
246 | */ |
||
247 | public function getUrlArgs() |
||
251 | |||
252 | /** |
||
253 | * @param array $urlArgs |
||
254 | * @return $this |
||
255 | */ |
||
256 | public function setUrlArgs($urlArgs) |
||
261 | |||
262 | /** |
||
263 | * @return boolean |
||
264 | */ |
||
265 | public function isMutableContent() |
||
269 | |||
270 | /** |
||
271 | * @param boolean $mutableContent |
||
272 | * @return $this |
||
273 | */ |
||
274 | public function setMutableContent($mutableContent) |
||
279 | |||
280 | /** |
||
281 | * {@inheritdoc} |
||
282 | */ |
||
283 | public function validateRecipient($token) |
||
300 | } |
||
301 |