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