1 | <?php |
||
5 | abstract class QuickReply implements \JsonSerializable |
||
6 | { |
||
7 | const TYPE_TEXT = 'text'; |
||
8 | const TYPE_LOCATION = 'location'; |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $contentType; |
||
14 | |||
15 | /** |
||
16 | * @param string $contentType TYPE_* |
||
17 | */ |
||
18 | 13 | public function __construct($contentType) |
|
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | 2 | public function getContentType() |
|
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | 3 | public function jsonSerialize() |
|
40 | |||
41 | /** |
||
42 | * @param string $title |
||
43 | * |
||
44 | * @throws \InvalidArgumentException |
||
45 | */ |
||
46 | 9 | public static function validateTitleSize($title) |
|
52 | |||
53 | /** |
||
54 | * @param $payload |
||
55 | * |
||
56 | * @throws \InvalidArgumentException |
||
57 | */ |
||
58 | 8 | public static function validatePayload($payload) |
|
64 | } |
||
65 |