@@ -162,8 +162,9 @@ discard block |
||
162 | 162 | { |
163 | 163 | $config = $module->getConfig(); |
164 | 164 | |
165 | - if (!array_key_exists($view, $config["view_manager"]["view_map"]) || !file_exists($config["view_manager"]["view_map"][$view])) |
|
166 | - throw new Exception\ViewNotFoundException("The 'view' template " . $view . " does not exists"); |
|
165 | + if (!array_key_exists($view, $config["view_manager"]["view_map"]) || !file_exists($config["view_manager"]["view_map"][$view])) { |
|
166 | + throw new Exception\ViewNotFoundException("The 'view' template " . $view . " does not exists"); |
|
167 | + } |
|
167 | 168 | |
168 | 169 | $this->view = $config["view_manager"]["view_map"][$view]; |
169 | 170 | } |
@@ -193,8 +194,9 @@ discard block |
||
193 | 194 | { |
194 | 195 | foreach ($params as $param => $value) |
195 | 196 | { |
196 | - if (property_exists(__CLASS__, strtolower($param)) && method_exists($this, 'set'.$param)) |
|
197 | - $this->{'set'.$param}($value); |
|
197 | + if (property_exists(__CLASS__, strtolower($param)) && method_exists($this, 'set'.$param)) { |
|
198 | + $this->{'set'.$param}($value); |
|
199 | + } |
|
198 | 200 | } |
199 | 201 | } |
200 | 202 | |
@@ -223,25 +225,28 @@ discard block |
||
223 | 225 | |
224 | 226 | if ($controller->getTerminal()) |
225 | 227 | { |
226 | - if (file_exists($view)) |
|
227 | - include $view; |
|
228 | - } |
|
229 | - else |
|
228 | + if (file_exists($view)) { |
|
229 | + include $view; |
|
230 | + } |
|
231 | + } else |
|
230 | 232 | { |
231 | - if (!is_null($this->view) && !file_exists($this->view)) |
|
232 | - throw new Exception\ViewNotFoundException("The 'view' template " . $this->view . " does not exists"); |
|
233 | + if (!is_null($this->view) && !file_exists($this->view)) { |
|
234 | + throw new Exception\ViewNotFoundException("The 'view' template " . $this->view . " does not exists"); |
|
235 | + } |
|
233 | 236 | |
234 | 237 | $config = $controller->getModule()->getConfig(); |
235 | 238 | |
236 | 239 | $layout = $controller->getLayout(); |
237 | 240 | |
238 | - if (!array_key_exists($controller->getLayout(), $config["view_manager"]["template_map"])) |
|
239 | - throw new Exception\PageNotFoundException("The 'template' " . $layout . " was not defined in module.config.php"); |
|
241 | + if (!array_key_exists($controller->getLayout(), $config["view_manager"]["template_map"])) { |
|
242 | + throw new Exception\PageNotFoundException("The 'template' " . $layout . " was not defined in module.config.php"); |
|
243 | + } |
|
240 | 244 | |
241 | 245 | $template = $config["view_manager"]["template_map"][$controller->getLayout()]; |
242 | 246 | |
243 | - if (!file_exists($template)) |
|
244 | - throw new Exception\PageNotFoundException("The 'template' " . $template . " does not exists"); |
|
247 | + if (!file_exists($template)) { |
|
248 | + throw new Exception\PageNotFoundException("The 'template' " . $template . " does not exists"); |
|
249 | + } |
|
245 | 250 | |
246 | 251 | include $template; |
247 | 252 | } |
@@ -268,8 +273,9 @@ discard block |
||
268 | 273 | */ |
269 | 274 | public function content() |
270 | 275 | { |
271 | - if (!file_exists($this->view)) |
|
272 | - throw new Exception\ViewNotFoundException("The 'view' template " . $this->view . " does not exists"); |
|
276 | + if (!file_exists($this->view)) { |
|
277 | + throw new Exception\ViewNotFoundException("The 'view' template " . $this->view . " does not exists"); |
|
278 | + } |
|
273 | 279 | |
274 | 280 | include $this->view; |
275 | 281 | } |