mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
25 lines
498 B
PHP
25 lines
498 B
PHP
<?php
|
|
|
|
namespace Ts {
|
|
class Math {
|
|
public static function multi($x, $y) {
|
|
return $x * $y;
|
|
}
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
require_once __DIR__.'/../src/Fenom.php';
|
|
|
|
\Fenom::registerAutoload();
|
|
|
|
$fenom = Fenom::factory(__DIR__.'/templates', __DIR__.'/compiled', Fenom::FORCE_COMPILE);
|
|
|
|
$fenom->display("extends/75-child.tpl", array(
|
|
"user" => array(
|
|
"name" => "Ivka",
|
|
'type' => 'new'
|
|
),
|
|
'type' => 'new'
|
|
));
|
|
} |