| @@ 1054-1064 (lines=11) @@ | ||
| 1051 | * @param string $step |
|
| 1052 | * @return string |
|
| 1053 | */ |
|
| 1054 | public function previousStep($step = null) |
|
| 1055 | { |
|
| 1056 | $steps = $this->getStepsArray(); |
|
| 1057 | $key = array_search($step, $steps); |
|
| 1058 | ||
| 1059 | if (is_int($key) && $key > 0) { |
|
| 1060 | return $steps[$key-1]; |
|
| 1061 | } |
|
| 1062 | ||
| 1063 | return false; |
|
| 1064 | } |
|
| 1065 | ||
| 1066 | /** |
|
| 1067 | * This method returns the next step in the game workflow |
|
| @@ 1071-1081 (lines=11) @@ | ||
| 1068 | * @param string $step |
|
| 1069 | * @return string |
|
| 1070 | */ |
|
| 1071 | public function nextStep($step = null) |
|
| 1072 | { |
|
| 1073 | $steps = $this->getStepsArray(); |
|
| 1074 | $key = array_search($step, $steps); |
|
| 1075 | ||
| 1076 | if (is_int($key) && $key < count($steps)-1) { |
|
| 1077 | return $steps[$key+1]; |
|
| 1078 | } |
|
| 1079 | ||
| 1080 | return false; |
|
| 1081 | } |
|
| 1082 | ||
| 1083 | /** |
|
| 1084 | * @return string $stepsViews |
|