| 1 | <?php |
||
| 11 | class Keyboard implements Template |
||
| 12 | { |
||
| 13 | /** @var Button[] */ |
||
| 14 | private $buttons; |
||
| 15 | private $parameters; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param Button[] $buttons |
||
| 19 | * @param array $parameters |
||
| 20 | */ |
||
| 21 | 3 | public function __construct(array $buttons = [], array $parameters = []) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param Button[] $buttons |
||
| 29 | * @param array $parameters |
||
| 30 | * |
||
| 31 | * @return static |
||
| 32 | */ |
||
| 33 | 3 | public static function make(array $buttons = [], array $parameters = []) |
|
| 34 | { |
||
| 35 | 3 | return new static($buttons, $parameters); |
|
| 36 | } |
||
| 37 | |||
| 38 | 2 | public function getName(): string |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @return Button[] |
||
| 45 | */ |
||
| 46 | 1 | public function getButtons(): array |
|
| 50 | |||
| 51 | public function addButton(Button $button): Keyboard |
||
| 57 | |||
| 58 | 1 | public function getParameters(): Collection |
|
| 62 | |||
| 63 | public function setParameters(array $parameters): Keyboard |
||
| 69 | } |
||
| 70 |