@@ -97,6 +97,9 @@ discard block |
||
97 | 97 | $this->app->run(); |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param string $functionName |
|
102 | + */ |
|
100 | 103 | private function returnJson($functionName, $request, $args, $response) |
101 | 104 | { |
102 | 105 | $functionOutput = call_user_func($functionName, $request, $args); |
@@ -113,6 +116,11 @@ discard block |
||
113 | 116 | return $response->withHeader('Content-Type', 'application/json;charset=utf-8')->withHeader('X-Powered-By', "reformo/rslim")->withStatus($status); |
114 | 117 | } |
115 | 118 | |
119 | + /** |
|
120 | + * @param string $functionName |
|
121 | + * @param string $action |
|
122 | + * @param string $template |
|
123 | + */ |
|
116 | 124 | private function returnHtml($functionName, $request, $args, $response, $route, $action, $template){ |
117 | 125 | if (!file_exists($this->config['base_dir'] . $template)) { |
118 | 126 | throw new \Exception("<strong>Template file not found!</strong> " . $route . '/' . $action . " needs a template file at:" . $template); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | return $response->withHeader('Content-Type', 'application/json;charset=utf-8')->withHeader('X-Powered-By', "reformo/rslim")->withStatus($status); |
114 | 114 | } |
115 | 115 | |
116 | - private function returnHtml($functionName, $request, $args, $response, $route, $action, $template){ |
|
116 | + private function returnHtml($functionName, $request, $args, $response, $route, $action, $template) { |
|
117 | 117 | if (!file_exists($this->config['base_dir'] . $template)) { |
118 | 118 | throw new \Exception("<strong>Template file not found!</strong> " . $route . '/' . $action . " needs a template file at:" . $template); |
119 | 119 | } |