1<?php 2 3namespace MediaWiki\HookContainer; 4 5interface HookRegistry { 6 /** 7 * Get the current contents of the $wgHooks variable or a mocked substitute 8 * @return array 9 */ 10 public function getGlobalHooks(); 11 12 /** 13 * Get the current contents of the Hooks attribute in the ExtensionRegistry. 14 * The contents is extended and normalized from the value of the 15 * corresponding attribute in extension.json. It does not contain "legacy" 16 * handlers, those are extracted into $wgHooks. 17 * 18 * It is a three dimensional array: 19 * 20 * - The outer level is an array of hooks keyed by hook name. 21 * - The second level is an array of handlers, with integer indexes. 22 * - The third level is an associative array with the following members: 23 * - handler: An ObjectFactory spec, except that it also has an 24 * element "name" which is a unique string identifying the handler, 25 * for the purposes of sharing handler instances. 26 * - deprecated: A boolean value indicating whether the extension 27 * is acknowledging deprecation of the hook, to activate call 28 * filtering. 29 * - extensionPath: The path to the extension.json file in which the 30 * handler was defined. This is only used for deprecation messages. 31 * 32 * @return array 33 */ 34 public function getExtensionHooks(); 35 36 /** 37 * @return DeprecatedHooks 38 */ 39 public function getDeprecatedHooks(); 40} 41