MediaWiki REL1_39
|
This is a simple immutable HookRegistry which can be used to set up a local HookContainer in tests and for similar purposes. More...
Public Member Functions | |
__construct (array $globalHooks=[], array $extensionHooks=[], array $deprecatedHooksArray=[]) | |
getDeprecatedHooks () | |
getExtensionHooks () | |
Get the current contents of the Hooks attribute in the ExtensionRegistry. | |
getGlobalHooks () | |
Get the current contents of the $wgHooks variable or a mocked substitute. | |
This is a simple immutable HookRegistry which can be used to set up a local HookContainer in tests and for similar purposes.
Definition at line 9 of file StaticHookRegistry.php.
MediaWiki\HookContainer\StaticHookRegistry::__construct | ( | array | $globalHooks = [], |
array | $extensionHooks = [], | ||
array | $deprecatedHooksArray = [] ) |
array | $globalHooks | An array of legacy hooks in the same format as $wgHooks |
array | $extensionHooks | An array of modern hooks in the format described in HookRegistry::getExtensionHooks() |
array | $deprecatedHooksArray | An array of deprecated hooks in the format expected by DeprecatedHooks::__construct(). These hooks are added to the core deprecated hooks list which is always present. |
Definition at line 27 of file StaticHookRegistry.php.
MediaWiki\HookContainer\StaticHookRegistry::getDeprecatedHooks | ( | ) |
Implements MediaWiki\HookContainer\HookRegistry.
Definition at line 48 of file StaticHookRegistry.php.
MediaWiki\HookContainer\StaticHookRegistry::getExtensionHooks | ( | ) |
Get the current contents of the Hooks attribute in the ExtensionRegistry.
The contents is extended and normalized from the value of the corresponding attribute in extension.json. It does not contain "legacy" handlers, those are extracted into $wgHooks.
It is a three dimensional array:
Implements MediaWiki\HookContainer\HookRegistry.
Definition at line 41 of file StaticHookRegistry.php.
MediaWiki\HookContainer\StaticHookRegistry::getGlobalHooks | ( | ) |
Get the current contents of the $wgHooks variable or a mocked substitute.
Implements MediaWiki\HookContainer\HookRegistry.
Definition at line 37 of file StaticHookRegistry.php.