56 public function render($viewName, $asString =
false) {
57 $templateEngine = Startup::$templateEngine;
58 $ext = \pathinfo ( $viewName, PATHINFO_EXTENSION );
60 $viewName = $viewName .
'.'.Startup::getViewNameFileExtension();
64 return $templateEngine->render ( $viewName, $data, $asString );
67 if (\is_array ( $data )) {
70 $fileName = \ROOT . \DS .
'views' . \DS . $viewName;
71 if (\file_exists ( $fileName )) {
78 throw new \Exception (
"View {$viewName} not found!" );