MediaWiki REL1_37
|
Public Member Functions | |
__construct (array $deprecatedHooks=[]) | |
getDeprecationInfo (?string $hook=null) | |
Gets deprecation info for a specific hook or all hooks if hook not specified. | |
isHookDeprecated (string $hook) | |
Checks whether hook is marked deprecated. | |
markDeprecated (string $hook, string $version, ?string $component=null, bool $silent=false) | |
For use by extensions, to add to list of deprecated hooks. | |
Private Attributes | |
array[] | $deprecatedHooks |
List of deprecated hooks. | |
Definition at line 27 of file DeprecatedHooks.php.
MediaWiki\HookContainer\DeprecatedHooks::__construct | ( | array | $deprecatedHooks = [] | ) |
array[] | $deprecatedHooks | List of hooks to mark as deprecated. Value arrays for each hook contain:
|
Definition at line 77 of file DeprecatedHooks.php.
References MediaWiki\HookContainer\DeprecatedHooks\$deprecatedHooks, and MediaWiki\HookContainer\DeprecatedHooks\markDeprecated().
MediaWiki\HookContainer\DeprecatedHooks::getDeprecationInfo | ( | ?string | $hook = null | ) |
Gets deprecation info for a specific hook or all hooks if hook not specified.
string | null | $hook | (optional) Hook name |
Definition at line 134 of file DeprecatedHooks.php.
MediaWiki\HookContainer\DeprecatedHooks::isHookDeprecated | ( | string | $hook | ) |
Checks whether hook is marked deprecated.
string | $hook | Hook name |
Definition at line 125 of file DeprecatedHooks.php.
MediaWiki\HookContainer\DeprecatedHooks::markDeprecated | ( | string | $hook, |
string | $version, | ||
?string | $component = null , |
||
bool | $silent = false |
||
) |
For use by extensions, to add to list of deprecated hooks.
Core-defined hooks should instead be added to $this->$deprecatedHooks directly. However, the preferred method of marking a hook deprecated is by adding it to the DeprecatedHooks attribute in extension.json
string | $hook | |
string | $version | Version in which the hook was deprecated, to pass to wfDeprecated() |
string | null | $component | (optional) component to pass to wfDeprecated(). |
bool | $silent | True to not raise any deprecation warning |
InvalidArgumentException | Hook has already been marked deprecated |
Definition at line 100 of file DeprecatedHooks.php.
Referenced by MediaWiki\HookContainer\DeprecatedHooks\__construct().
|
private |
List of deprecated hooks.
Value arrays for each hook contain:
Definition at line 36 of file DeprecatedHooks.php.
Referenced by MediaWiki\HookContainer\DeprecatedHooks\__construct().