MediaWiki master
MediaWiki\Interwiki\Hook\InterwikiLoadPrefixHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onInterwikiLoadPrefix ( $prefix, &$iwData)
 This hook is called when resolving whether a given prefix is an interwiki or not.
 

Detailed Description

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

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

Deprecated:
since 1.36, does not support enumerating all valid prefixes; for testing purposes (re)set $wgInterwikiCache instead.
Stability: stable
to implement

Definition at line 14 of file InterwikiLoadPrefixHook.php.

Member Function Documentation

◆ onInterwikiLoadPrefix()

MediaWiki\Interwiki\Hook\InterwikiLoadPrefixHook::onInterwikiLoadPrefix (   $prefix,
$iwData 
)

This hook is called when resolving whether a given prefix is an interwiki or not.

Since
1.35
Parameters
string$prefixInterwiki prefix we are looking for
array&$iwDataOutput array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid
Returns
bool|void True (or no return value) without providing an interwiki to continue interwiki search, or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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