1 | <?php |
||
23 | class DefaultFactory implements Factory |
||
24 | { |
||
25 | /** |
||
26 | * Notification parameters list. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected static $notificationParams = [ |
||
31 | Message::PARAMETER_TITLE, |
||
32 | Message::PARAMETER_BODY, |
||
33 | Message::PARAMETER_ICON, |
||
34 | Message::PARAMETER_SOUND, |
||
35 | Message::PARAMETER_TAG, |
||
36 | Message::PARAMETER_COLOR, |
||
37 | Message::PARAMETER_CLICK_ACTION, |
||
38 | Message::PARAMETER_TITLE_LOC_KEY, |
||
39 | Message::PARAMETER_TITLE_LOC_ARGS, |
||
40 | Message::PARAMETER_BODY_LOC_KEY, |
||
41 | Message::PARAMETER_BODY_LOC_ARGS, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function buildPushClient($apiKey) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | * |
||
69 | * @throws \ZendService\Google\Exception\InvalidArgumentException |
||
70 | * @throws \ZendService\Google\Exception\RuntimeException |
||
71 | */ |
||
72 | public function buildPushMessage(array $tokens, Notification $notification) |
||
91 | |||
92 | /** |
||
93 | * Message should have notification data. |
||
94 | * |
||
95 | * @param Message $message |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | private function shouldAddNotification(Message $message) |
||
113 | } |
||
114 |