| 1 | <?php |
||
| 9 | abstract class Button implements Template |
||
| 10 | { |
||
| 11 | protected $label; |
||
| 12 | protected $parameters; |
||
| 13 | |||
| 14 | 3 | public function __construct(string $label, array $parameters = []) |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Get name. |
||
| 22 | * |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | 3 | public function getName(): string |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Get label. |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 3 | public function getLabel(): ?string |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Set label. |
||
| 42 | * |
||
| 43 | * @param string $label |
||
| 44 | * |
||
| 45 | * @return static |
||
| 46 | */ |
||
| 47 | public function setLabel(string $label): Button |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get button parameters. |
||
| 56 | * |
||
| 57 | * @return array |
||
| 58 | */ |
||
| 59 | 1 | public function getParameters(): array |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Set parameters. |
||
| 66 | * |
||
| 67 | * @param array $parameters |
||
| 68 | * |
||
| 69 | * @return static |
||
| 70 | */ |
||
| 71 | public function setParameters(array $parameters): Button |
||
| 77 | } |
||
| 78 |