| @@ 971-981 (lines=11) @@ | ||
| 968 | * @param string $step |
|
| 969 | * @return string |
|
| 970 | */ |
|
| 971 | public function previousStep($step = null) |
|
| 972 | { |
|
| 973 | $steps = $this->getStepsArray(); |
|
| 974 | $key = array_search($step, $steps); |
|
| 975 | ||
| 976 | if (is_int($key) && $key > 0) { |
|
| 977 | return $steps[$key-1]; |
|
| 978 | } |
|
| 979 | ||
| 980 | return false; |
|
| 981 | } |
|
| 982 | ||
| 983 | /** |
|
| 984 | * This method returns the next step in the game workflow |
|
| @@ 988-998 (lines=11) @@ | ||
| 985 | * @param string $step |
|
| 986 | * @return string |
|
| 987 | */ |
|
| 988 | public function nextStep($step = null) |
|
| 989 | { |
|
| 990 | $steps = $this->getStepsArray(); |
|
| 991 | $key = array_search($step, $steps); |
|
| 992 | ||
| 993 | if (is_int($key) && $key < count($steps)-1) { |
|
| 994 | return $steps[$key+1]; |
|
| 995 | } |
|
| 996 | ||
| 997 | return false; |
|
| 998 | } |
|
| 999 | ||
| 1000 | /** |
|
| 1001 | * @return string $stepsViews |
|