1 | <?php |
||
10 | class NotificationPresenter extends BasePresenter |
||
11 | { |
||
12 | /** |
||
13 | * 通知类型对应的消息. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $type_messages = |
||
18 | [ |
||
19 | 'new_reply' => 'Your topic have new reply', |
||
20 | 'attention' => 'Attented topic has new reply', |
||
21 | 'at' => 'Mention you At', |
||
22 | 'topic_favorite' => 'Favorited your topic', |
||
23 | 'topic_attent' => 'Attented your topic', |
||
24 | 'topic_upvote' => 'Up Vote your topic', |
||
25 | 'reply_upvote' => 'Up Vote your reply', |
||
26 | 'topic_mark_wiki' => 'has mark your topic as wiki', |
||
27 | 'topic_mark_excellent' => 'has recomended your topic', |
||
28 | 'comment_append' => 'Commented topic has new update', |
||
29 | 'attention_append' => 'Attented topic has new update', |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * 解析通知类型对应的消息. |
||
34 | * |
||
35 | * @return string |
||
36 | * |
||
37 | * @throws \Exception |
||
38 | */ |
||
39 | public function typeMessage() |
||
47 | |||
48 | /** |
||
49 | * 拼装完整通知消息. |
||
50 | * |
||
51 | * @return string |
||
52 | * |
||
53 | * @throws \Exception |
||
54 | */ |
||
55 | public function message() |
||
61 | } |
||
62 |