Small refactoring

This commit is contained in:
bzick
2013-03-17 14:37:23 +04:00
parent 454fff1a08
commit bd056bf75b
9 changed files with 128 additions and 125 deletions

View File

@ -53,7 +53,7 @@ $template = $twig->loadTemplate('echo/twig.tpl');
$template->render($data);
var_dump("Twig cached: ".(microtime(true)-$start));
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::CHECK_MTIME);
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::AUTO_RELOAD);
$start = microtime(true);
$template = $aspect->fetch('echo/smarty.tpl', $data);

View File

@ -38,7 +38,7 @@ $template = $twig->loadTemplate('foreach/twig.tpl');
$template->render($data);
var_dump("Twig cached: ".(microtime(true)-$start));
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::CHECK_MTIME | Aspect::INCLUDE_SOURCES);
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::AUTO_RELOAD | Aspect::INCLUDE_SOURCES);
$start = microtime(true);
$template = $aspect->fetch('foreach/smarty.tpl', $data);

View File

@ -49,7 +49,7 @@ $template = $twig->loadTemplate('inheritance/twig/b100.tpl');
$template->render($data);
var_dump("Twig cached: ".(microtime(true)-$start));
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::CHECK_MTIME);
$aspect = Aspect::factory(__DIR__, __DIR__."/../compile/", Aspect::AUTO_RELOAD);
$start = microtime(true);
$template = $aspect->fetch('inheritance/smarty/b100.tpl', $data);