MediaWiki fundraising/REL1_35
StaticHookRegistry.php
Go to the documentation of this file.
1<?php
2
4
11 private $globalHooks;
12
15
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
37 public function getGlobalHooks() {
38 return $this->globalHooks;
39 }
40
41 public function getExtensionHooks() {
43 }
44
48 public function getDeprecatedHooks() {
50 }
51}
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.
getExtensionHooks()
Get the current contents of the Hooks attribute in the ExtensionRegistry.
__construct(array $globalHooks=[], array $extensionHooks=[], array $deprecatedHooksArray=[])