for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace League\Plates\RenderTemplate;
use League\Plates;
use Throwable;
use Exception;
final class FileSystemRenderTemplate implements Plates\RenderTemplate
{
private $include;
public function __construct($include = null) {
$this->include = $include ?: Plates\Template\phpInclude();
}
public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) {
$path = Plates\Template\getPath($template);
try {
return ($this->include)($path, $template->data);
} catch (Exception $e) {
} catch (Throwable $e) {
throw new Plates\Exception\PlatesException(
'An exception occurred while rendering Template ' . $template->name . '.',
0,
$e
);