| @@ 178-188 (lines=11) @@ | ||
| 175 | $optionalPattern .= '{' . $parameter . '}/'; |
|
| 176 | ||
| 177 | // Add SamsonPHP specific async method |
|
| 178 | foreach (Route::$METHODS as $httpMethod) { |
|
| 179 | // Add route for this controller action |
|
| 180 | $routes->add( |
|
| 181 | new Route( |
|
| 182 | $optionalPattern, |
|
| 183 | array($module, $method), // Route callback |
|
| 184 | $module->id . '_' . $httpMethod . '_' . $method.'_'.$parameter, // Route identifier |
|
| 185 | $async . $httpMethod // Prepend async prefix to method if found |
|
| 186 | ) |
|
| 187 | ); |
|
| 188 | } |
|
| 189 | } |
|
| 190 | ||
| 191 | // Add SamsonPHP without optional parameters |
|
| @@ 192-202 (lines=11) @@ | ||
| 189 | } |
|
| 190 | ||
| 191 | // Add SamsonPHP without optional parameters |
|
| 192 | foreach (Route::$METHODS as $httpMethod) { |
|
| 193 | // Add route for this controller action |
|
| 194 | $routes->add( |
|
| 195 | new Route( |
|
| 196 | $pattern, |
|
| 197 | array($module, $method), // Route callback |
|
| 198 | $module->id . '_' . $httpMethod . '_' . $method, // Route identifier |
|
| 199 | $async . $httpMethod // Prepend async prefix to method if found |
|
| 200 | ) |
|
| 201 | ); |
|
| 202 | } |
|
| 203 | ||
| 204 | return $routes; |
|
| 205 | } |
|