обновление которое может сломать часть примеров
This commit is contained in:
parent
3b7e186fda
commit
f11b9b3e56
7 changed files with 22 additions and 30 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
require_once '../klein.php';
|
||||
require_once '../Klein.php';
|
||||
|
||||
function title($x) {
|
||||
return ucfirst($x);
|
||||
}
|
||||
|
||||
$tpl = new Klein('tempalte.html');
|
||||
$tpl = new Klein('template.html');
|
||||
|
||||
$u1 = new stdClass();
|
||||
$u1->name = 'Paul';
|
||||
|
|
@ -20,11 +20,11 @@ $u3 = new stdClass();
|
|||
$u3->name = 'Jane';
|
||||
$u3->age = 12;
|
||||
|
||||
echo $tpl->render(array(
|
||||
echo $tpl->render([
|
||||
'pagename' => 'awesome people',
|
||||
'authors' => [$u1, $u2, $u3],
|
||||
'city'=> [
|
||||
'Yaroslaval' => 1,
|
||||
'Moscow' => 2
|
||||
]
|
||||
));
|
||||
]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue