This commit is contained in:
bzick
2015-08-13 14:55:00 +03:00
parent 544aa4f248
commit 5c86d2d6ae
4 changed files with 83 additions and 16 deletions

View File

@ -5,10 +5,9 @@ require_once __DIR__.'/../tests/tools.php';
\Fenom::registerAutoload();
$fenom = Fenom::factory(__DIR__.'/templates', __DIR__.'/compiled');
$fenom->setOptions(Fenom::AUTO_RELOAD | Fenom::FORCE_COMPILE);
$fenom->addAccessorSmart('fetch', 'fetch', Fenom::ACCESSOR_METHOD);
var_dump($fenom->compileCode('{$.fetch("template.tpl")}')->getBody());
$fenom = Fenom::factory(__DIR__.'/../tests/resources/provider', __DIR__.'/../tests/resources/compile');
$fenom->setOptions(Fenom::AUTO_RELOAD);
var_dump($fenom->fetch('extends/auto/parent.tpl'));
//var_dump($fenom->compile("bug158/main.tpl", [])->getTemplateCode());
//var_dump($fenom->display("bug158/main.tpl", []));
// $fenom->getTemplate("problem.tpl");