Skip to content

Commit

Permalink
注释调整
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Sep 20, 2019
1 parent 47b0db7 commit e98bdbb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use Exception;
use Psr\SimpleCache\CacheInterface;
use think\template\exception\TemplateNotFoundException;

/**
* ThinkPHP分离出来的模板引擎
Expand Down Expand Up @@ -132,8 +131,8 @@ public function assign(array $vars = [])
/**
* 模板引擎参数赋值
* @access public
* @param mixed $name
* @param mixed $value
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
Expand Down Expand Up @@ -282,8 +281,8 @@ public function isCache(string $cacheId): bool
/**
* 渲染模板内容
* @access public
* @param string $content 模板内容
* @param array $vars 模板变量
* @param string $content 模板内容
* @param array $vars 模板变量
* @return void
*/
public function display(string $content, array $vars = []): void
Expand All @@ -306,8 +305,8 @@ public function display(string $content, array $vars = []): void
/**
* 设置布局
* @access public
* @param mixed $name 布局模板名称 false 则关闭布局
* @param string $replace 布局模板内容替换标识
* @param mixed $name 布局模板名称 false 则关闭布局
* @param string $replace 布局模板内容替换标识
* @return $this
*/
public function layout($name, string $replace = '')
Expand Down Expand Up @@ -1221,7 +1220,7 @@ private function parseTemplateName(string $templateName): string
* 解析模板文件名
* @access private
* @param string $template 文件名
* @return string|false
* @return string
*/
private function parseTemplateFile(string $template): string
{
Expand All @@ -1243,7 +1242,7 @@ private function parseTemplateFile(string $template): string
return $template;
}

throw new TemplateNotFoundException('template not exists:' . $template, $template);
throw new Exception('template not exists:' . $template);
}

/**
Expand Down

0 comments on commit e98bdbb

Please sign in to comment.