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 $type; |
||
14 | |||
15 | /** |
||
16 | * @param string $type |
||
17 | */ |
||
18 | 13 | public function __construct($type) |
|
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | 2 | public function getType() |
|
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | 3 | public function jsonSerialize() |
|
42 | |||
43 | /** |
||
44 | * @param string $title |
||
45 | * |
||
46 | * @throws \InvalidArgumentException |
||
47 | */ |
||
48 | 9 | public static function validateTitleSize($title) |
|
54 | |||
55 | /** |
||
56 | * @param $payload |
||
57 | * |
||
58 | * @throws \InvalidArgumentException |
||
59 | */ |
||
60 | 8 | public static function validatePayload($payload) |
|
66 | } |
||
67 |