...
|
...
|
@@ -154,11 +154,11 @@ class TemplateLayout implements View_Interface |
|
|
else {
|
|
|
$template = file_get_contents($viewName, false, null);
|
|
|
$phpStr = LightnCandy::compile($template, array(
|
|
|
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
|
|
|
'flags' => LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
|
|
|
'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录
|
|
|
'fileext' => array($tplExt), // 允许查找文件的后缀
|
|
|
'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime
|
|
|
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
|
|
|
'flags' => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
|
|
|
'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录
|
|
|
'fileext' => array($tplExt), // 允许查找文件的后缀
|
|
|
'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime
|
|
|
));
|
|
|
// 文件流方式读取PHP方法
|
|
|
$renderer = LightnCandy::prepare($phpStr);
|
...
|
...
|
|