It's a pretty fine distinction, and I think most people use the terms interchangeably. However, according to this article on Wikipedia:
http://en.wikipedia.org/wiki/Hooking ...the "event" is the place in the core code that you can insert your plugin code, and the "hook" is the code that you run when that event happens. So, in the case you give, the "event" is "StartPrimaryNav", and the "hook" is the method PluginA::onStartPrimaryNav(). -Evan On Sun, 2010-11-07 at 08:22 +0800, 橡树 wrote: > Hi, > > First of all, thanks for Zach's reply. > > I have read nearly all the wiki articles on StatusNet plugin > development, but I was still confused about the concept of EVENT and > HOOK. > > For example, the PluginA has a event handler. > > /****************************************/ > //plugina.php > ...... > class PluginA extends Plugin > { > function onStartPrimaryNav($action) > { > return true; > } > } > ...... > /****************************************/ > > The EVENT is StartPrimaryNav, and the HOOK is StartPrimaryNav. Am I > right? If so, does't it mean that the EVENT and the HOOK are same > thing? > > Regards, > Blue > > P.S. > How to use mailing list? reply to > statusnet-dev-requ...@lists.status.net directly, or mail to > statusnet-...@lists.status.net. > > > > _______________________________________________ > StatusNet-dev mailing list > StatusNet-dev@lists.status.net > http://lists.status.net/mailman/listinfo/statusnet-dev -- Evan Prodromou, CEO, StatusNet Inc. 1124 rue Marie-Anne Est #32, Montreal, QC, Canada H2J 2B7 E: e...@status.net T: 438-380-4801 x101 W: http://evan.status.net/ _______________________________________________ StatusNet-dev mailing list StatusNet-dev@lists.status.net http://lists.status.net/mailman/listinfo/statusnet-dev