行为绑定支持闭包函数

This commit is contained in:
thinkphp
2013-04-08 20:16:26 +08:00
parent 48132b4534
commit 10e85046df

View File

@@ -67,6 +67,9 @@ class Tag {
* @return void
*/
static public function exec($name, &$params=NULL) {
if($name instanceof \Closure) {
return $name($params);
}
if(false === strpos($name,'\\')) {
$class = '\\'.ucwords(MODULE_NAME).'\\Behavior\\'.$name;
}else{