An action handler is a subclass of the Action class. Every hit on StatusNet has an 'action' parameter, and we automatically map a class to each action.
By default, for an action like 'deletegroup', the action handler class is DeletegroupAction in the deletegroup.php file in actions/ subdirectory. You can register your own actions if you have other pages you want to show. The Sample plugin has a HelloAction in hello.php. You can see in SamplePlugin how the plugin registers the action. An event handler, as you've seen before, is a function that's called at important points in core code that changes how that core code works. Another name for this is a 'hook'. -Evan On Mon, 2010-11-08 at 22:06 +0800, 橡树 wrote: > Hi, > > In the wiki page HOWTO Make a Plugin > (http://status.net/wiki/HOWTO_Make_a_Plugin), I find two similiar > phrases, 'action handler' and 'event handler'. I want to know what's > difference between them. Could somebody please tell me? Thanks! > > Regards, > Blue > > P.S. > I'm looking forward to recieve the reply of my former mails. > 1. What's difference between EVENT and HOOK? > 2. A puzzle in event handler > 3. The priority of the event handler > 4. Why not $action->raw("..."), but $action->action->raw("...")? > > > > _______________________________________________ > 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