@@ -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); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function __construct($config) |
26 | 26 | { |
27 | 27 | $this->config = array_merge($this->config, $config); |
28 | - define('RSLIM_DEFAULT_RETURN_TYPE',$this->config['default_return_type']); |
|
28 | + define('RSLIM_DEFAULT_RETURN_TYPE', $this->config['default_return_type']); |
|
29 | 29 | ini_set("default_charset", "utf-8"); |
30 | 30 | ini_set('date.timezone', $config['app']['timezone']); |
31 | 31 | $configuration = [ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | return $response->withHeader('Content-Type', 'application/json;charset=utf-8')->withHeader('X-Powered-By', "reformo/rslim")->withStatus($status); |
121 | 121 | } |
122 | 122 | |
123 | - private function returnHtml($functionName, $request, $args, $response, $route, $action, $template){ |
|
123 | + private function returnHtml($functionName, $request, $args, $response, $route, $action, $template) { |
|
124 | 124 | if (!file_exists($this->config['base_dir'] . $template)) { |
125 | 125 | throw new \Exception("<strong>Template file not found!</strong> " . $route . '/' . $action . " needs a template file at:" . $template); |
126 | 126 | } |