|
|
|
|
@ -104,7 +104,7 @@ final class View |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$fileExt = ViewType::getFileExtensionFor($type); |
|
|
|
|
$file = $this->findViewPath($viewFile . $fileExt); |
|
|
|
|
$file = $this->findViewPath($viewFile . "View" . $fileExt); |
|
|
|
|
if ($type == ViewType::TWIG) { |
|
|
|
|
$this->useTemplateEngineTwig = true; |
|
|
|
|
$this->templateType = str_replace('.', '', $fileExt); |
|
|
|
|
@ -122,8 +122,8 @@ final class View |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($file === false) { |
|
|
|
|
echo "No view file exists for: {$viewFile}!"; |
|
|
|
|
throw new \Exception("View File does not exist: " . $viewFile); |
|
|
|
|
echo "No view file exists for: {$viewFile}View!"; |
|
|
|
|
throw new \Exception("View File does not exist: " . $viewFile. "View"); |
|
|
|
|
} else { |
|
|
|
|
$this->files[] = array('file' => $file, 'path' => UseDir::PROJECT, 'fileType' => $fileExt); |
|
|
|
|
} |
|
|
|
|
|