This commit is contained in:
bzick
2016-05-08 18:26:01 +03:00
parent d23e2b4c4f
commit dec06c888e
7 changed files with 53 additions and 6 deletions

View File

@@ -7,10 +7,7 @@ require_once __DIR__.'/../tests/tools.php';
$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('{foreach $list as $k => $e last=$l first=$f index=$i} {if $f}first{/if} {$i}: {$k} => {$e}, {if $l}last{/if} {/foreach}')->getTemplateCode());
var_dump($fenom->compileCode('{do $object->method()}')->getTemplateCode());
//var_dump($fenom->compile("bug158/main.tpl", [])->getTemplateCode());
//var_dump($fenom->display("bug158/main.tpl", []));
// $fenom->getTemplate("problem.tpl");