[ Index ]

PHP Cross Reference of DokuWiki




/inc/Extension/ -> EventHandler.php (summary)

(no description)

File Size: 108 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

EventHandler:: (4 methods):

Class: EventHandler  - X-Ref

Controls the registration and execution of all events,

__construct()   X-Ref

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 a hook for an event

param: string $event string   name used by the event, (incl '_before' or '_after' for triggers)
param: string $advise
param: object $obj object in whose scope method is to be executed,
param: string $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