升级thinkphp到5.1.39
This commit is contained in:
1 parent
c8839fa4f8
commit
a58d04e7e2
37 files changed
+546
-192
No files matched your search
@@ -18,9 +18,16 @@ class View extends Response
|
||||
// 输出参数
|
||||
protected $options = [];
|
||||
protected $vars = [];
|
||||
protected $config = [];
|
||||
protected $filter;
|
||||
protected $contentType = 'text/html';
|
||||
|
||||
/**
|
||||
* 是否内容渲染
|
||||
* @var bool
|
||||
*/
|
||||
protected $isContent = false;
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @access protected
|
||||
@@ -32,7 +39,19 @@ class View extends Response
|
||||
// 渲染模板输出
|
||||
return $this->app['view']
|
||||
->filter($this->filter)
|
||||
->fetch($data, $this->vars);
|
||||
->fetch($data, $this->vars, $this->config, $this->isContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否为内容渲染
|
||||
* @access public
|
||||
* @param bool $content
|
||||
* @return $this
|
||||
*/
|
||||
public function isContent($content = true)
|
||||
{
|
||||
$this->isContent = $content;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +87,12 @@ class View extends Response
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function config($config)
|
||||
{
|
||||
$this->config = $config;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 视图内容过滤
|
||||
* @access public
|
||||
|
||||
Reference in new issue
Block a user