| 1 | <?php declare(strict_types=1); |
||
| 7 | final class State extends Subject |
||
| 8 | { |
||
| 9 | public const CREATED = 0; |
||
| 10 | public const STARTED = 1; |
||
| 11 | public const WAITING = 2; |
||
| 12 | public const BUSY = 3; |
||
| 13 | public const DONE = 4; |
||
| 14 | |||
| 15 | private $state = self::CREATED; |
||
| 16 | |||
| 17 | 11 | public function onNext($state) |
|
| 26 | |||
| 27 | 5 | public function getState(): int |
|
| 31 | } |
||
| 32 |