MediaWiki REL1_37
GlobalHookRegistry.php
Go to the documentation of this file.
1<?php
2
4
6
16
17 public function __construct(
20 ) {
21 $this->extensionRegistry = $extensionRegistry;
22 $this->deprecatedHooks = $deprecatedHooks;
23 }
24
25 public function getGlobalHooks() {
26 global $wgHooks;
27 return $wgHooks;
28 }
29
30 public function getExtensionHooks() {
31 return $this->extensionRegistry->getAttribute( 'Hooks' ) ?? [];
32 }
33
34 public function getDeprecatedHooks() {
36 }
37}
$wgHooks
Global list of hooks.
The Registry loads JSON files, and uses a Processor to extract information from them.
A HookRegistry which sources its data from dynamically changing sources: $wgHooks and an ExtensionReg...
getExtensionHooks()
Get the current contents of the Hooks attribute in the ExtensionRegistry.
__construct(ExtensionRegistry $extensionRegistry, DeprecatedHooks $deprecatedHooks)
getGlobalHooks()
Get the current contents of the $wgHooks variable or a mocked substitute.