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 "FormatAutocomments" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14interface FormatAutocommentsHook {
15    /**
16     * This hook is called when an autocomment is formatted by the Linker.
17     *
18     * @since 1.35
19     *
20     * @param string|null &$comment Reference to the accumulated comment.
21     *   Initially null, when set the default code will be skipped.
22     * @param bool $pre True if there is text before this autocomment
23     * @param string $auto Extracted part of the parsed comment before the call to the hook
24     * @param bool $post True if there is text after this autocomment
25     * @param Title|null $title Optional title object used to links to sections
26     * @param bool $local Whether section links should refer to local page
27     * @param string|null $wikiId ID (as used by WikiMap) of the wiki from which the
28     *   autocomment originated; null for the local wiki. Added in 1.26, should default
29     *   to null in handler functions, for backwards compatibility.
30     * @return bool|void True or no return value to continue or false to abort
31     */
32    public function onFormatAutocomments( &$comment, $pre, $auto, $post, $title,
33        $local, $wikiId
34    );
35}