mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
规范调整
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\template\driver;
|
||||
use think\exception;
|
||||
use think\Exception;
|
||||
|
||||
class File {
|
||||
// 写入编译缓存
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\template;
|
||||
use think\Exception;
|
||||
|
||||
/**
|
||||
* ThinkPHP标签库TagLib解析基类
|
||||
@@ -83,7 +84,7 @@ class TagLib {
|
||||
$xml = '<tpl><tag '.$attr.' /></tpl>';
|
||||
$xml = simplexml_load_string($xml);
|
||||
if(!$xml) {
|
||||
exit('_XML_TAG_ERROR_ : '.$attr);
|
||||
throw new Exception('_XML_TAG_ERROR_ : '.$attr);
|
||||
}
|
||||
$xml = (array)($xml->tag->attributes());
|
||||
$array = array_change_key_case($xml['@attributes']);
|
||||
@@ -100,7 +101,7 @@ class TagLib {
|
||||
if( isset($array[$name])) {
|
||||
$array[$name] = str_replace('___','&',$array[$name]);
|
||||
}elseif(false !== array_search($name,$must)){
|
||||
exit('_PARAM_ERROR_:'.$name);
|
||||
throw new Exception('_PARAM_ERROR_:'.$name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user