[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 119 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
EventHandler:: (5 methods):
__construct()
register_hook()
process_event()
hasHandlerForEvent()
getEventHandlers()
Class: EventHandler - X-Ref
Controls the registration and execution of all events,__construct() X-Ref |
event_handler constructor, loads all action plugins and calls their register() method giving them an opportunity to register any hooks they require |
register_hook($event, $advise, $obj, $method, $param = null, $seq = 0) X-Ref |
register_hook register a hook for an event param: string $event name used by the event param: string $advise BEFORE|AFTER param: object $obj scope for the method be executed on, NULL for global function or callable param: string|callable $method event handler function param: mixed $param data passed to the event handler param: int $seq sequence number for ordering hook execution (ascending) |
process_event($event, $advise = '') X-Ref |
process the before/after event param: Event $event param: string $advise BEFORE or AFTER |
hasHandlerForEvent($name, $advise = '') X-Ref |
Check if an event has any registered handlers When $advise is empty, both BEFORE and AFTER events will be considered, otherwise only the given advisory is checked param: string $name Name of the event param: string $advise BEFORE, AFTER or empty return: bool |
getEventHandlers() X-Ref |
Get all hooks and their currently registered handlers The handlers are sorted by sequence, then by register time return: array |