1 | <?php |
||
22 | class GcmMessage extends Message |
||
23 | { |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $notificationPayload = []; |
||
28 | |||
29 | /** |
||
30 | * Get notification payload data. |
||
31 | * |
||
32 | * @return array |
||
33 | */ |
||
34 | public function getNotificationPayload() |
||
38 | |||
39 | /** |
||
40 | * Set notification payload data. |
||
41 | * |
||
42 | * @param array $payload |
||
43 | * |
||
44 | * @throws \ZendService\Google\Exception\InvalidArgumentException |
||
45 | * @throws \ZendService\Google\Exception\RuntimeException |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setNotificationPayload(array $payload) |
||
59 | |||
60 | /** |
||
61 | * Add notification payload data. |
||
62 | * |
||
63 | * @param string $key |
||
64 | * @param mixed $value |
||
65 | * |
||
66 | * @throws \ZendService\Google\Exception\InvalidArgumentException |
||
67 | * @throws \ZendService\Google\Exception\RuntimeException |
||
68 | * |
||
69 | * @return $this |
||
70 | */ |
||
71 | public function addNotificationPayload($key, $value) |
||
87 | |||
88 | /** |
||
89 | * Clear notification payload data. |
||
90 | */ |
||
91 | public function clearNotificationPayload() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function toJson() |
||
128 | |||
129 | /** |
||
130 | * Retrieve payload. |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | protected function getCompoundPayload() |
||
147 | } |
||
148 |