...
|
...
|
@@ -74,7 +74,7 @@ class TemplateLayout implements View_Interface |
|
|
$config = Application::app()->getConfig()->get('application');
|
|
|
$tplExt = $config->template->ext;
|
|
|
$viewPath = $config->template->path;
|
|
|
$viewName = $viewPath . '/' . $request->module . '/' . $request->controller . '/' . $tpl . '.' . $tplExt;
|
|
|
$viewName = $viewPath . '/' . $request->module . '/' . $request->controller . '/' . $tpl . $tplExt;
|
|
|
// 判断视图模板文件是否存在, 不存在则直接返回空
|
|
|
if (!file_exists($viewName)) {
|
|
|
return '';
|
...
|
...
|
@@ -102,7 +102,7 @@ class TemplateLayout implements View_Interface |
|
|
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
|
|
|
'flags' => LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
|
|
|
'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录
|
|
|
'fileext' => array('.' . $tplExt), // 允许查找文件的后缀
|
|
|
'fileext' => array($tplExt), // 允许查找文件的后缀
|
|
|
'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime
|
|
|
));
|
|
|
// 文件流方式读取PHP方法
|
...
|
...
|
|