MediaWiki  master
GlobalHookRegistry.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
11 class GlobalHookRegistry implements HookRegistry {
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 }
MediaWiki\HookContainer\GlobalHookRegistry\getExtensionHooks
getExtensionHooks()
Get the current contents of the Hooks attribute in the ExtensionRegistry.
Definition: GlobalHookRegistry.php:30
ExtensionRegistry
ExtensionRegistry class.
Definition: ExtensionRegistry.php:18
MediaWiki\HookContainer\HookRegistry
Definition: HookRegistry.php:5
MediaWiki\HookContainer\DeprecatedHooks
Definition: DeprecatedHooks.php:27
$wgHooks
$wgHooks
Global list of hooks.
Definition: DefaultSettings.php:7928
MediaWiki\HookContainer\GlobalHookRegistry\getGlobalHooks
getGlobalHooks()
Get the current contents of the $wgHooks variable or a mocked substitute.
Definition: GlobalHookRegistry.php:25
MediaWiki\HookContainer
Definition: DeprecatedHooks.php:23
MediaWiki\HookContainer\GlobalHookRegistry
A HookRegistry which sources its data from dynamically changing sources: $wgHooks and an ExtensionReg...
Definition: GlobalHookRegistry.php:11
MediaWiki\HookContainer\GlobalHookRegistry\$deprecatedHooks
DeprecatedHooks $deprecatedHooks
Definition: GlobalHookRegistry.php:15
MediaWiki\HookContainer\GlobalHookRegistry\getDeprecatedHooks
getDeprecatedHooks()
Definition: GlobalHookRegistry.php:34
MediaWiki\HookContainer\GlobalHookRegistry\$extensionRegistry
ExtensionRegistry $extensionRegistry
Definition: GlobalHookRegistry.php:13
MediaWiki\HookContainer\GlobalHookRegistry\__construct
__construct(ExtensionRegistry $extensionRegistry, DeprecatedHooks $deprecatedHooks)
Definition: GlobalHookRegistry.php:17