| 1 | <?php |
||
| 12 | final class DefaultTransitionTable implements TransitionTable |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private $transitions = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @param \Noodle\Transition\Transition[] ...$transitions |
||
| 23 | */ |
||
| 24 | 14 | public function __construct(Transition ...$transitions) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | * |
||
| 35 | * @throws InvalidInputForState |
||
| 36 | */ |
||
| 37 | 14 | public function resolve(State $currentState, Input $input) : State |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Returns the key to use to store the action involving application of an |
||
| 50 | * input to a given state internally. |
||
| 51 | * |
||
| 52 | * @param State $currentState |
||
| 53 | * @param Input $input |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | 14 | private function getActionKey(State $currentState, Input $input) : string |
|
| 61 | } |
||
| 62 |