feat: Поддержка psr4. Кеширование шаблона

This commit is contained in:
origami11@yandex.ru 2025-05-21 15:50:17 +03:00
parent 825641813b
commit 0c30dc230d
9 changed files with 71 additions and 61 deletions

View file

@ -1,9 +1,10 @@
<?php
require_once '../Klein.php';
use ctiso\Klein;
$data = ['phedor', 'andrey'];
require_once '../Klein.php';
$tpl = new Klein(__DIR__ . '/cache');
$tpl = new Klein('template3.html');
echo $tpl->render(['names' => $data]);
echo $tpl->render('template3.html', ['names' => $data]);