MediaWiki REL1_37
MediaWiki\HookContainer\HookRegistry Interface Reference
Inheritance diagram for MediaWiki\HookContainer\HookRegistry:

Public Member Functions

 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.
 

Detailed Description

Definition at line 5 of file HookRegistry.php.

Member Function Documentation

◆ getDeprecatedHooks()

MediaWiki\HookContainer\HookRegistry::getDeprecatedHooks ( )

◆ getExtensionHooks()

MediaWiki\HookContainer\HookRegistry::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:

  • The outer level is an array of hooks keyed by hook name.
  • The second level is an array of handlers, with integer indexes.
  • The third level is an associative array with the following members:
    • handler: An ObjectFactory spec, except that it also has an element "name" which is a unique string identifying the handler, for the purposes of sharing handler instances.
    • deprecated: A boolean value indicating whether the extension is acknowledging deprecation of the hook, to activate call filtering.
    • extensionPath: The path to the extension.json file in which the handler was defined. This is only used for deprecation messages.
Returns
array

Implemented in MediaWiki\HookContainer\GlobalHookRegistry, and MediaWiki\HookContainer\StaticHookRegistry.

◆ getGlobalHooks()

MediaWiki\HookContainer\HookRegistry::getGlobalHooks ( )

Get the current contents of the $wgHooks variable or a mocked substitute.

Returns
array

Implemented in MediaWiki\HookContainer\GlobalHookRegistry, and MediaWiki\HookContainer\StaticHookRegistry.


The documentation for this interface was generated from the following file: