Add a test for function creation. I can't manage to make it fail when needed. Still I'll commit anyway !

This commit is contained in:
Sébastien Lucas 2014-01-06 21:24:11 +01:00
parent f7ecb87af5
commit e96eaf86e5
3 changed files with 31 additions and 16 deletions

View file

@ -129,24 +129,10 @@
<body>
<?php
if (useServerSideRendering ()) {
// Get the templates
$header = file_get_contents('templates/default/header.html');
$footer = file_get_contents('templates/default/footer.html');
$main = file_get_contents('templates/default/main.html');
$bookdetail = file_get_contents('templates/default/bookdetail.html');
$page = file_get_contents('templates/default/page.html');
// Get the data
$data = getJson (true);
// Generate the function for the template
$template = new doT ();
$dot = $template->template ($page, array ("bookdetail" => $bookdetail,
"header" => $header,
"footer" => $footer,
"main" => $main));
// Execute the template
echo $dot ($data);
echo serverSideRender ($data);
}
?>
</body>