1 | <?php |
||
8 | class ExponentMessage |
||
9 | { |
||
10 | protected $tokens = []; |
||
11 | |||
12 | protected $title; |
||
13 | protected $body; |
||
14 | |||
15 | protected $sound = 'default'; |
||
16 | |||
17 | protected $badge = 0; |
||
18 | |||
19 | protected $ttl = 0; |
||
20 | |||
21 | protected $channelId = 'Default'; |
||
22 | |||
23 | protected $jsonData = []; |
||
24 | |||
25 | public static function create() |
||
29 | |||
30 | /** |
||
31 | * @param array $tokens |
||
32 | * @return ExponentMessage |
||
33 | */ |
||
34 | public function setTokens($tokens) |
||
40 | |||
41 | /** |
||
42 | * @param mixed $title |
||
43 | * @return ExponentMessage |
||
44 | */ |
||
45 | public function setTitle($title) |
||
51 | |||
52 | /** |
||
53 | * @param mixed $body |
||
54 | * @return ExponentMessage |
||
55 | */ |
||
56 | public function setBody($body) |
||
62 | |||
63 | /** |
||
64 | * @param string $sound |
||
65 | * @return ExponentMessage |
||
66 | */ |
||
67 | public function setSound($sound) |
||
73 | |||
74 | /** |
||
75 | * @param int $badge |
||
76 | * @return ExponentMessage |
||
77 | */ |
||
78 | public function setBadge($badge) |
||
84 | |||
85 | /** |
||
86 | * @param int $ttl |
||
87 | * @return ExponentMessage |
||
88 | */ |
||
89 | public function setTtl($ttl) |
||
95 | |||
96 | /** |
||
97 | * @param string $channelId |
||
98 | * @return ExponentMessage |
||
99 | */ |
||
100 | public function setChannelId($channelId) |
||
106 | |||
107 | /** |
||
108 | * @param array $jsonData |
||
109 | * @return ExponentMessage |
||
110 | */ |
||
111 | public function setJsonData($jsonData) |
||
117 | |||
118 | /** |
||
119 | * @return array |
||
120 | */ |
||
121 | public function getTokens() |
||
125 | |||
126 | /** |
||
127 | * Get the instance as an array. |
||
128 | * |
||
129 | * @return array |
||
130 | */ |
||
131 | public function toArray() |
||
143 | } |
||
144 |