Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Hook;
4
5use MediaWiki\Title\Title;
6
7/**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "GetLocalURL" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14interface GetLocalURLHook {
15    /**
16     * Use this hook to modify local URLs as output into page links. Note that if you are
17     * working with internal urls (non-interwiki) then it may be preferable to work
18     * with the GetLocalURL::Internal or GetLocalURL::Article hooks as GetLocalURL can
19     * be buggy for internal URLs on render if you do not re-implement the horrible
20     * hack that Title::getLocalURL uses in your own extension.
21     *
22     * @since 1.35
23     *
24     * @param Title $title Title object of page
25     * @param string &$url String value as output (out parameter, can modify)
26     * @param string $query Query options as string passed to Title::getLocalURL()
27     * @return bool|void True or no return value to continue or false to abort
28     */
29    public function onGetLocalURL( $title, &$url, $query );
30}