类库别名和调用修正

增加sae日志驱动
改进Hook类的exec方法
行为扩展优先检测标签方法 不存在则调用run方法
NOW_TIME改用REQUEST_TIME_FLOAT
变量命名规范
This commit is contained in:
thinkphp
2015-02-24 10:45:34 +08:00
parent 20bd23c7d1
commit d28e27270c
16 changed files with 148 additions and 102 deletions

View File

@@ -76,11 +76,7 @@ class Hook {
if($name instanceof \Closure) {
return $name($params);
}
if('Behavior' == substr($name,-8) ){
// 行为扩展必须用run入口方法
$tag = 'run';
}
$addon = new $name();
return $addon->$tag($params);
return method_exists($addon,$tag) ? $addon->$tag($params): $addon->run($params);
}
}