| 1 | <?php |
||
| 8 | class SectionStateMachine |
||
| 9 | { |
||
| 10 | const STATE_OF_DETAIL = 'detail'; |
||
| 11 | const STATE_OF_INFORMATION = 'information'; |
||
| 12 | const STATE_OF_SCOREBOARD = 'scoreboard'; |
||
| 13 | const STATE_OF_STATISTIC = 'statistic'; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | private $currentState; |
||
| 17 | |||
| 18 | public function __construct() |
||
| 22 | |||
| 23 | public function reset() |
||
| 27 | |||
| 28 | public function setCurrentStateToDetail() |
||
| 32 | |||
| 33 | public function setCurrentStateToInformation() |
||
| 37 | |||
| 38 | public function setCurrentStateToScoreboard() |
||
| 42 | |||
| 43 | public function setCurrentStateToStatistic() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | public function theCurrentStateIsDetail() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return bool |
||
| 58 | */ |
||
| 59 | public function theCurrentStateIsInformation() |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return bool |
||
| 66 | */ |
||
| 67 | public function theCurrentStateIsScoreboard() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return bool |
||
| 74 | */ |
||
| 75 | public function theCurrentStateIsStatistic() |
||
| 79 | } |