Init.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Core;
|
||||
|
||||
class View {
|
||||
|
||||
public function generateTpl($template, $data ) {
|
||||
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem(APP_PATH . DS . 'html'), array('autoescape' => false));
|
||||
$template = $template . '.html';
|
||||
$template = $twig->loadTemplate($template);
|
||||
return $template->render($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user