MediaWiki master
StaticHookRegistry.php
Go to the documentation of this file.
1<?php
2
4
11 private $globalHooks;
12
14 private $extensionHooks;
15
17 private $deprecatedHooks;
18
27 public function __construct(
28 array $globalHooks = [],
29 array $extensionHooks = [],
30 array $deprecatedHooksArray = []
31 ) {
32 $this->globalHooks = $globalHooks;
33 $this->extensionHooks = $extensionHooks;
34 $this->deprecatedHooks = new DeprecatedHooks( $deprecatedHooksArray );
35 }
36
38 public function getGlobalHooks() {
39 return $this->globalHooks;
40 }
41
43 public function getExtensionHooks() {
44 return $this->extensionHooks;
45 }
46
50 public function getDeprecatedHooks() {
51 return $this->deprecatedHooks;
52 }
53}
This is a simple immutable HookRegistry which can be used to set up a local HookContainer in tests an...
getGlobalHooks()
Get the current contents of the $wgHooks variable or a mocked substitute.array
getExtensionHooks()
Get the current contents of the Hooks attribute in the ExtensionRegistry.The contents is extended and...
__construct(array $globalHooks=[], array $extensionHooks=[], array $deprecatedHooksArray=[])