1 | <?php |
||
12 | class Message implements MessageInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var string Push notification message. |
||
16 | */ |
||
17 | private $message; |
||
18 | |||
19 | /** |
||
20 | * @var string|array User device tokens |
||
21 | */ |
||
22 | private $token; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $customData = array(); |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $badge = 0; |
||
33 | |||
34 | /** |
||
35 | * @var string Sound of notification. |
||
36 | */ |
||
37 | private $sound; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | private $type; |
||
43 | |||
44 | 16 | public function __construct($type = null) |
|
50 | |||
51 | 7 | public function getMessage() |
|
55 | |||
56 | 1 | public function setMessage($message) |
|
60 | |||
61 | 5 | public function getToken() |
|
65 | |||
66 | 5 | public function setToken($token) |
|
74 | |||
75 | 1 | public function getCustomData() |
|
79 | |||
80 | 1 | public function setCustomData(array $data) |
|
84 | |||
85 | 6 | public function getBadge() |
|
89 | |||
90 | 1 | public function setBadge($badge) |
|
94 | |||
95 | 6 | public function getSound() |
|
99 | |||
100 | 1 | public function setSound($sound) |
|
104 | |||
105 | 2 | public function getType() |
|
109 | |||
110 | 5 | public function setType($type) |
|
117 | |||
118 | 3 | public function addToken($token) |
|
132 | |||
133 | 3 | public function isMultiple() |
|
137 | |||
138 | 2 | public function cloneWith($type, $tokens) |
|
150 | |||
151 | /** |
||
152 | * @param $token |
||
153 | */ |
||
154 | 2 | private function merge($token) |
|
162 | } |