MediaWiki REL1_37
|
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. | |
Private Attributes | |
DeprecatedHooks | $deprecatedHooks |
array | $extensionHooks |
array | $globalHooks |
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.
References MediaWiki\HookContainer\StaticHookRegistry\$extensionHooks, and MediaWiki\HookContainer\StaticHookRegistry\$globalHooks.
MediaWiki\HookContainer\StaticHookRegistry::getDeprecatedHooks | ( | ) |
Implements MediaWiki\HookContainer\HookRegistry.
Definition at line 48 of file StaticHookRegistry.php.
References MediaWiki\HookContainer\StaticHookRegistry\$deprecatedHooks.
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.
References MediaWiki\HookContainer\StaticHookRegistry\$extensionHooks.
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.
References MediaWiki\HookContainer\StaticHookRegistry\$globalHooks.
|
private |
Definition at line 17 of file StaticHookRegistry.php.
Referenced by MediaWiki\HookContainer\StaticHookRegistry\getDeprecatedHooks().
|
private |
Definition at line 14 of file StaticHookRegistry.php.
Referenced by MediaWiki\HookContainer\StaticHookRegistry\__construct(), and MediaWiki\HookContainer\StaticHookRegistry\getExtensionHooks().
|
private |
Definition at line 11 of file StaticHookRegistry.php.
Referenced by MediaWiki\HookContainer\StaticHookRegistry\__construct(), and MediaWiki\HookContainer\StaticHookRegistry\getGlobalHooks().