| 1 | <?php |
||
| 10 | final class DefaultTransition implements CreateableFromPattern, Transition |
||
| 11 | { |
||
| 12 | use CreatesFromPattern; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var State |
||
| 16 | */ |
||
| 17 | private $currentState; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Input |
||
| 21 | */ |
||
| 22 | private $input; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var State |
||
| 26 | */ |
||
| 27 | private $nextState; |
||
| 28 | |||
| 29 | 16 | public function __construct(State $currentState, Input $input, State $nextState) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | 16 | public function getCurrentState() : State |
|
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | 16 | public function getInput() : Input |
|
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | 16 | public function getNextState() : State |
|
| 59 | } |
||
| 60 |