|
MediaWiki
REL1_19
|
Static Public Member Functions | |
| static | getHandlers ($name) |
| Returns an array of all the event functions attached to a hook. | |
| static | hookErrorHandler ($errno, $errstr) |
| This REALLY should be protected... | |
| static | isRegistered ($name) |
| Returns true if a hook has a function registered to it. | |
| static | register ($name, $callback) |
| Attach an event handler to a given hook. | |
| static | run ($event, $args=array()) |
| Call hook functions defined in Hooks::register. | |
Static Protected Attributes | |
| static | $handlers = array() |
Hooks class.
Used to supersede $wgHooks, because globals are EVIL.
| static Hooks::getHandlers | ( | $ | name | ) | [static] |
| static Hooks::hookErrorHandler | ( | $ | errno, |
| $ | errstr | ||
| ) | [static] |
| static Hooks::isRegistered | ( | $ | name | ) | [static] |
| static Hooks::register | ( | $ | name, |
| $ | callback | ||
| ) | [static] |
Attach an event handler to a given hook.
| $name | Mixed: name of hook |
| $callback | Mixed: callback function to attach |
Definition at line 44 of file Hooks.php.
Referenced by HooksTest\testNewStyleHooks().

| static Hooks::run | ( | $ | event, |
| $ | args = array() |
||
| ) | [static] |
Call hook functions defined in Hooks::register.
Because programmers assign to $wgHooks, we need to be very careful about its contents. So, there's a lot more error-checking in here than would normally be necessary.
| $event | String: event name |
| $args | Array: parameters passed to hook functions |
Definition at line 91 of file Hooks.php.
References $wgHooks, wfProfileIn(), and wfProfileOut().
Referenced by wfRunHooks().

