cout<<"behavior_1_body"<<endl;
cout<<"behavior_2_body"<<endl;
//from somewhere to get the behavior_1 and behavior_2's function body.
behavior_1 = (fun_behavior_1);
behavior_2 = (fun_behavior_2);
//also, behavior_3 is not found
所以 在thinkphp中的行为也类似于这样。定义好了函数的指针(就是tags数组的的key)
然后来调用key对应的value所描述的行为函数。
echo "doSomething, code by yourself";
这里的Behavior_1 Behavior_2函数可以改成自己的代码,就类似与自己指定,不指定的话 就执行默认的。
doSomething 就是在两个Behavior中间的函数,类似与action_begin 和action_end中间的action。