| 1 | <?php |
||
| 10 | class Keyboard implements Template |
||
| 11 | { |
||
| 12 | /** @var Button[] */ |
||
| 13 | private $buttons; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Add button. |
||
| 17 | * |
||
| 18 | * @param Button $button |
||
| 19 | * |
||
| 20 | * @return Keyboard |
||
| 21 | */ |
||
| 22 | 1 | public function addButton(Button $button): Keyboard |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Get buttons. |
||
| 31 | * |
||
| 32 | * @return Button[] |
||
| 33 | */ |
||
| 34 | 1 | public function getButtons(): array |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Get the instance as an array. |
||
| 41 | * |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | 1 | public function toArray(): array |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Specify data which should be serialized to JSON. |
||
| 53 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
| 54 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
| 55 | * which is a value of any type other than a resource. |
||
| 56 | * @since 5.4.0 |
||
| 57 | */ |
||
| 58 | 1 | public function jsonSerialize(): array |
|
| 62 | } |
||
| 63 |