wiki.techinc.nl/includes/interwiki/Hook/InterwikiLoadPrefixHook.php
Umherirrender 8831b494c1 Use @deprecated annotation on hook interfaces, not functions
Use only one place to document the deprecation of hook
interfaces/functions

Bug: T282903
Change-Id: Ie7d2d7a50afe2897e5c2369f473a33ecaa821637
2021-05-17 23:00:40 +02:00

27 lines
929 B
PHP

<?php
namespace MediaWiki\Interwiki\Hook;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "InterwikiLoadPrefix" to register handlers implementing this interface.
*
* @deprecated Does not support enumerating all valid prefixes; for testing
* purposes (re)set $wgInterwikiCache instead.
* @stable to implement
* @ingroup Hooks
*/
interface InterwikiLoadPrefixHook {
/**
* This hook is called when resolving whether a given prefix is an interwiki or not.
*
* @since 1.35
*
* @param string $prefix Interwiki prefix we are looking for
* @param array &$iwData Output array describing the interwiki with keys iw_url, iw_local,
* iw_trans and optionally iw_api and iw_wikiid
* @return bool|void True (or no return value) without providing an interwiki to continue
* interwiki search, or false to abort
*/
public function onInterwikiLoadPrefix( $prefix, &$iwData );
}