@@ -59,6 +59,9 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $function_name |
|
| 64 | + */ |
|
| 62 | 65 | private function returnJson($function_name, $request, $args, $response){ |
| 63 | 66 | $status = 500; |
| 64 | 67 | $function_output = call_user_func($function_name, $request, $args); |
@@ -74,6 +77,12 @@ discard block |
||
| 74 | 77 | return $response->withHeader('Content-Type', 'application/json;charset=utf-8')->withHeader('X-Powered-By', "reformo/rslim")->withStatus($status); |
| 75 | 78 | } |
| 76 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $function_name |
|
| 82 | + * @param string $action |
|
| 83 | + * @param string $controller |
|
| 84 | + * @param string $template |
|
| 85 | + */ |
|
| 77 | 86 | private function returnHtml($function_name, $request, $args, $response, $route, $action, $controller, $template){ |
| 78 | 87 | if (!file_exists($this->config['base_dir'] . $template)) { |
| 79 | 88 | throw new \Exception("<strong>Template file not found!</strong> " . $route . '/' . $action . " needs a template file at:" . $template); |