| @@ 927-937 (lines=11) @@ | ||
| 924 | * @param string $step |
|
| 925 | * @return string |
|
| 926 | */ |
|
| 927 | public function previousStep($step = null) |
|
| 928 | { |
|
| 929 | $steps = $this->getStepsArray(); |
|
| 930 | $key = array_search($step, $steps); |
|
| 931 | ||
| 932 | if (is_int($key) && $key > 0) { |
|
| 933 | return $steps[$key-1]; |
|
| 934 | } |
|
| 935 | ||
| 936 | return false; |
|
| 937 | } |
|
| 938 | ||
| 939 | /** |
|
| 940 | * This method returns the next step in the game workflow |
|
| @@ 944-954 (lines=11) @@ | ||
| 941 | * @param string $step |
|
| 942 | * @return string |
|
| 943 | */ |
|
| 944 | public function nextStep($step = null) |
|
| 945 | { |
|
| 946 | $steps = $this->getStepsArray(); |
|
| 947 | $key = array_search($step, $steps); |
|
| 948 | ||
| 949 | if (is_int($key) && $key < count($steps)-1) { |
|
| 950 | return $steps[$key+1]; |
|
| 951 | } |
|
| 952 | ||
| 953 | return false; |
|
| 954 | } |
|
| 955 | ||
| 956 | /** |
|
| 957 | * @return string $stepsViews |
|