1 | <?php |
||
9 | abstract class AbstractButton implements \JsonSerializable |
||
10 | { |
||
11 | use ValidatorTrait; |
||
12 | |||
13 | public const TYPE_POSTBACK = 'postback'; |
||
14 | public const TYPE_PHONE_NUMBER = 'phone_number'; |
||
15 | public const TYPE_WEB_URL = 'web_url'; |
||
16 | public const TYPE_PAYMENT = 'payment'; |
||
17 | public const TYPE_ACCOUNT_LINK = 'account_link'; |
||
18 | public const TYPE_ACCOUNT_UNLINK = 'account_unlink'; |
||
19 | |||
20 | /** @deprecated Since version 3.3.1 and will be removed in version 4.0.0. */ |
||
21 | public const TYPE_SHARE = 'element_share'; |
||
22 | |||
23 | /** @deprecated Since version 3.3.1 and will be removed in version 4.0.0. */ |
||
24 | public const TYPE_NESTED = 'nested'; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $type; |
||
30 | |||
31 | /** |
||
32 | * AbstractButton constructor. |
||
33 | */ |
||
34 | 20 | public function __construct(string $type) |
|
38 | |||
39 | 7 | public function getType(): string |
|
43 | |||
44 | 15 | public function toArray(): array |
|
50 | |||
51 | 15 | public function jsonSerialize(): array |
|
55 | } |
||
56 |