1 | <?php |
||
7 | class Reaction |
||
8 | { |
||
9 | public const REACTION_SMILE = 'smile'; |
||
10 | public const REACTION_ANGRY = 'angry'; |
||
11 | public const REACTION_SAD = 'sad'; |
||
12 | public const REACTION_WOW = 'wow'; |
||
13 | public const REACTION_LOVE = 'love'; |
||
14 | public const REACTION_LIKE = 'like'; |
||
15 | public const REACTION_DISLIKE = 'dislike'; |
||
16 | public const REACTION_OTHER = 'other'; |
||
17 | |||
18 | public const ACTION_REACT = 'react'; |
||
19 | public const ACTION_UNREACT = 'unreact'; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $reaction; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $emoji; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $action; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $mid; |
||
40 | |||
41 | /** |
||
42 | * Reaction constructor. |
||
43 | */ |
||
44 | 1 | public function __construct(string $reaction, string $emoji, string $action, string $mid) |
|
51 | |||
52 | 1 | public function getReaction(): string |
|
56 | |||
57 | 1 | public function getEmoji(): string |
|
61 | |||
62 | 1 | public function getAction(): string |
|
66 | |||
67 | 1 | public function getMid(): string |
|
71 | |||
72 | /** |
||
73 | * @return \Kerox\Messenger\Model\Callback\Reaction |
||
74 | */ |
||
75 | 1 | public static function create(array $callbackData): self |
|
84 | } |
||
85 |