| 1 | <?php |
||
| 7 | final class Countdown extends DynamicTerminalObject |
||
| 8 | { |
||
| 9 | /** @var string */ |
||
| 10 | private $label = ""; |
||
| 11 | |||
| 12 | /** @var int */ |
||
| 13 | private $from = 5; |
||
| 14 | |||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string $label |
||
| 18 | */ |
||
| 19 | public function __construct(string $label = "Starting in... ") |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * @param int $from |
||
| 27 | * |
||
| 28 | * @return self |
||
| 29 | */ |
||
| 30 | public function from(int $from): self |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function run(): void |
||
| 70 | } |
||
| 71 |