mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
Merge pull request #854 from yinggaozhen/tc-dir_clean
调整template相关test case
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace think;
|
||||
|
||||
use think\exception\TemplateNotFoundException;
|
||||
use think\template\TagLib;
|
||||
|
||||
/**
|
||||
* ThinkPHP分离出来的模板引擎
|
||||
@@ -121,7 +122,7 @@ class Template
|
||||
* 模板引擎配置项
|
||||
* @access public
|
||||
* @param array|string $config
|
||||
* @return void|array
|
||||
* @return string|void|array
|
||||
*/
|
||||
public function config($config)
|
||||
{
|
||||
@@ -235,7 +236,7 @@ class Template
|
||||
* @access public
|
||||
* @param mixed $name 布局模板名称 false 则关闭布局
|
||||
* @param string $replace 布局模板内容替换标识
|
||||
* @return object
|
||||
* @return Template
|
||||
*/
|
||||
public function layout($name, $replace = '')
|
||||
{
|
||||
@@ -689,6 +690,7 @@ class Template
|
||||
} else {
|
||||
$className = '\\think\\template\\taglib\\' . ucwords($tagLib);
|
||||
}
|
||||
/** @var Taglib $tLib */
|
||||
$tLib = new $className($this);
|
||||
$tLib->parseTag($content, $hide ? '' : $tagLib);
|
||||
return;
|
||||
@@ -1071,7 +1073,7 @@ class Template
|
||||
} else {
|
||||
$path = isset($module) ? APP_PATH . $module . DS . basename($this->config['view_path']) . DS : $this->config['view_path'];
|
||||
}
|
||||
$template = $path . $template . '.' . ltrim($this->config['view_suffix'], '.');
|
||||
$template = realpath($path . $template . '.' . ltrim($this->config['view_suffix'], '.'));
|
||||
}
|
||||
|
||||
if (is_file($template)) {
|
||||
|
||||
Reference in New Issue
Block a user