MediaWiki
REL1_35
GlobalHookRegistry.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\HookContainer
;
4
5
use
ExtensionRegistry
;
6
11
class
GlobalHookRegistry
implements
HookRegistry
{
13
private
$extensionRegistry
;
15
private
$deprecatedHooks
;
16
17
public
function
__construct
(
18
ExtensionRegistry
$extensionRegistry
,
19
DeprecatedHooks
$deprecatedHooks
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
() {
35
return
$this->deprecatedHooks
;
36
}
37
}
$wgHooks
$wgHooks
Global list of hooks.
Definition
DefaultSettings.php:7976
ExtensionRegistry
ExtensionRegistry class.
Definition
ExtensionRegistry.php:18
MediaWiki\HookContainer\DeprecatedHooks
Definition
DeprecatedHooks.php:27
MediaWiki\HookContainer\GlobalHookRegistry
A HookRegistry which sources its data from dynamically changing sources: $wgHooks and an ExtensionReg...
Definition
GlobalHookRegistry.php:11
MediaWiki\HookContainer\GlobalHookRegistry\getExtensionHooks
getExtensionHooks()
Get the current contents of the Hooks attribute in the ExtensionRegistry.
Definition
GlobalHookRegistry.php:30
MediaWiki\HookContainer\GlobalHookRegistry\__construct
__construct(ExtensionRegistry $extensionRegistry, DeprecatedHooks $deprecatedHooks)
Definition
GlobalHookRegistry.php:17
MediaWiki\HookContainer\GlobalHookRegistry\$extensionRegistry
ExtensionRegistry $extensionRegistry
Definition
GlobalHookRegistry.php:13
MediaWiki\HookContainer\GlobalHookRegistry\$deprecatedHooks
DeprecatedHooks $deprecatedHooks
Definition
GlobalHookRegistry.php:15
MediaWiki\HookContainer\GlobalHookRegistry\getGlobalHooks
getGlobalHooks()
Get the current contents of the $wgHooks variable or a mocked substitute.
Definition
GlobalHookRegistry.php:25
MediaWiki\HookContainer\GlobalHookRegistry\getDeprecatedHooks
getDeprecatedHooks()
Definition
GlobalHookRegistry.php:34
MediaWiki\HookContainer\HookRegistry
Definition
HookRegistry.php:5
MediaWiki\HookContainer
Definition
DeprecatedHooks.php:23
includes
HookContainer
GlobalHookRegistry.php
Generated on Sat Apr 6 2024 00:07:14 for MediaWiki by
1.9.8