feat: Поддержка psr4. Кеширование шаблона
This commit is contained in:
parent
825641813b
commit
0c30dc230d
9 changed files with 71 additions and 61 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue