mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
调整代码格式规范
This commit is contained in:
@@ -28,7 +28,6 @@ class View {
|
||||
'http_cache_id' => null,
|
||||
'view_path' => '',
|
||||
'view_suffix' => '.html',
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -129,7 +128,7 @@ class View {
|
||||
if(!is_file($template))
|
||||
E('template file not exists:'.$template);
|
||||
}
|
||||
$vars = $vars?$vars:$this->data;
|
||||
$vars = $vars ? $vars : $this->data;
|
||||
// 页面缓存
|
||||
ob_start();
|
||||
ob_implicit_flush(0);
|
||||
@@ -157,13 +156,13 @@ class View {
|
||||
// 获取当前主题名称
|
||||
$theme = $this->getTemplateTheme();
|
||||
// 分析模板文件规则
|
||||
if(''==$template) {
|
||||
if('' == $template) {
|
||||
// 如果模板文件名为空 按照默认规则定位
|
||||
$template = CONTROLLER_NAME.'/'.ACTION_NAME;
|
||||
}elseif(false === strpos($template,'/')){
|
||||
$template = CONTROLLER_NAME.'/'.$template;
|
||||
}
|
||||
return ($this->config['view_path']?$this->config['view_path']:MODULE_PATH.'View/').$theme.$template.$this->config['view_suffix'];
|
||||
return ($this->config['view_path'] ? $this->config['view_path'] : MODULE_PATH.'View/').$theme.$template.$this->config['view_suffix'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user