1 | <?php |
||
6 | abstract class AbstractButtons implements \JsonSerializable |
||
7 | { |
||
8 | |||
9 | use ValidatorTrait; |
||
10 | |||
11 | const TYPE_POSTBACK = 'postback'; |
||
12 | const TYPE_PHONE_NUMBER = 'phone_number'; |
||
13 | const TYPE_WEB_URL = 'web_url'; |
||
14 | const TYPE_SHARE = 'element_share'; |
||
15 | const TYPE_PAYMENT = 'payment'; |
||
16 | const TYPE_ACCOUNT_LINK = 'account_link'; |
||
17 | const TYPE_ACCOUNT_UNLINK = 'account_unlink'; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $type; |
||
23 | |||
24 | /** |
||
25 | * AbstractButton constructor. |
||
26 | * |
||
27 | * @param string $type |
||
28 | */ |
||
29 | public function __construct(string $type) |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getType(): string |
||
41 | |||
42 | /** |
||
43 | * @return array |
||
44 | */ |
||
45 | public function jsonSerialize(): array |
||
51 | } |