fenom/sandbox/fenom.php
2016-04-11 20:19:31 +03:00

16 lines
580 B
PHP

<?php
require_once __DIR__.'/../src/Fenom.php';
require_once __DIR__.'/../tests/tools.php';
\Fenom::registerAutoload();
$fenom = Fenom::factory(__DIR__.'/templates', __DIR__.'/../tests/resources/compile');
$fenom->setOptions(Fenom::AUTO_RELOAD);
$fenom->addModifier('firstimg', function ($img) {
return $img;
});
var_dump($fenom->compileCode('{block "pb"}- {$a} -{/block} =={paste "pb"}==')->getTemplateCode());
//var_dump($fenom->compile("bug158/main.tpl", [])->getTemplateCode());
//var_dump($fenom->display("bug158/main.tpl", []));
// $fenom->getTemplate("problem.tpl");