2013-07-22 18:03:43 +04:00
|
|
|
<?php
|
|
|
|
|
2014-01-28 21:24:47 +04:00
|
|
|
namespace Ts {
|
|
|
|
class Math {
|
|
|
|
public static function multi($x, $y) {
|
|
|
|
return $x * $y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-08-11 19:55:30 +04:00
|
|
|
|
2014-01-28 21:24:47 +04:00
|
|
|
namespace {
|
|
|
|
require_once __DIR__.'/../vendor/autoload.php';
|
2013-08-11 19:55:30 +04:00
|
|
|
|
2014-01-28 21:24:47 +04:00
|
|
|
$fenom = Fenom::factory(__DIR__.'/templates', __DIR__.'/compiled', Fenom::FORCE_COMPILE);
|
|
|
|
|
|
|
|
$fenom->display("greeting.tpl", array(
|
|
|
|
"user" => array(
|
|
|
|
"name" => "Ivka",
|
|
|
|
'type' => 'new'
|
|
|
|
),
|
2013-09-02 17:40:58 +04:00
|
|
|
'type' => 'new'
|
2014-01-28 21:24:47 +04:00
|
|
|
));
|
|
|
|
}
|