规范调整

This commit is contained in:
thinkphp
2015-10-03 21:43:48 +08:00
parent 7c2bcbcff2
commit 1cfb3704c6
31 changed files with 393 additions and 285 deletions

View File

@@ -10,7 +10,7 @@
// +----------------------------------------------------------------------
namespace think\template\driver;
use think\exception;
use think\Exception;
class File {
// 写入编译缓存

View 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);
}
}
}