MediaWiki  master
MediaWiki\Cache\Hook\MessageCacheFetchOverridesHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Cache\Hook\MessageCacheFetchOverridesHook:

Public Member Functions

 onMessageCacheFetchOverrides (array &$keys)
 This hook is called to fetch overrides. More...
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "MessageCacheFetchOverrides" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 12 of file MessageCacheFetchOverridesHook.php.

Member Function Documentation

◆ onMessageCacheFetchOverrides()

MediaWiki\Cache\Hook\MessageCacheFetchOverridesHook::onMessageCacheFetchOverrides ( array &  $keys)

This hook is called to fetch overrides.

Use this hook to override message keys for customisations. Returned messages key must be formatted with: 1) the first letter in lower case according to the content language 2) spaces replaced with underscores

Since
1.41
Parameters
(string|callable)[]&$keys Message keys mapped to their override. Values may also be a callable that returns a message key. Callables are passed the message key, the MessageCache instance, a Language/StubUserLang object and a boolean indicating if the value should be fetched from the database. Note that strings will always be interpreted as a message key, not a callable! This prevents ambiguity between message keys and functions. Use Closure::fromCallable or other callable syntaxes.

Implemented in MediaWiki\HookContainer\HookRunner.


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