diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Renderer/HtmlEngine.php | 2 | ||||
-rw-r--r-- | src/Renderer/Renderer.php | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Renderer/HtmlEngine.php b/src/Renderer/HtmlEngine.php index 4a48e1f0..75343bbd 100644 --- a/src/Renderer/HtmlEngine.php +++ b/src/Renderer/HtmlEngine.php @@ -29,6 +29,6 @@ class HtmlEngine implements EngineInterface */ public function canRender($path) { - return strpos($path, '.html') && file_exists($path); + return strpos($path, '.htm') && file_exists($path); } } diff --git a/src/Renderer/Renderer.php b/src/Renderer/Renderer.php index 5ed7cf31..de31ca74 100644 --- a/src/Renderer/Renderer.php +++ b/src/Renderer/Renderer.php @@ -2,8 +2,12 @@ namespace Engelsystem\Renderer; +use Psr\Log\LoggerAwareTrait; + class Renderer { + use LoggerAwareTrait; + /** @var EngineInterface[] */ protected $renderer = []; @@ -24,7 +28,10 @@ class Renderer return $renderer->get($template, $data); } - engelsystem_error('Unable to find a renderer for template file "' . $template . '".'); + if ($this->logger) { + $this->logger->error('Unable to find a renderer for template file "{file}"', ['file' => $template]); + } + return ''; } |