WoltLab/WCF — Issue #244: AbstractEventListener
Author: Gravatronics
Created: 2011-10-28 12:43:54+00:00
State: open

If an event listener listens to several events, it will or can look like this: https://github.com/WoltLab/com.woltlab.wcf.comment/blob/master/files/lib/system/event/listener/UserProfileCommentListener.class.php. Whouldn't an abstract implementation be nice where the execute method tests if a method with the name of the event exists, and calls it then (may-be with the event object as an argument). The only (solvable) problem would be that the event wouldn't be allowed to be named 'execute', which is the case for the `wcf\action\AbstractAction::execute()` method.