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\Api\Hook;
4
5use ApiBase;
6use MediaWiki\Title\Title;
7use ParserOptions;
8use Wikimedia\ScopedCallback;
9
10/**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "ApiMakeParserOptions" to register handlers implementing this interface.
13 *
14 * @stable to implement
15 * @ingroup Hooks
16 */
17interface ApiMakeParserOptionsHook {
18    /**
19     * This hook is called from ApiParse and ApiExpandTemplates to allow
20     * extensions to adjust the ParserOptions before parsing.
21     *
22     * @since 1.35
23     *
24     * @param ParserOptions $options
25     * @param Title $title Title to be parsed
26     * @param array $params Parameter array for the API module
27     * @param ApiBase $module API module (which is also a ContextSource)
28     * @param ScopedCallback|null &$reset Set to a ScopedCallback used to reset any hooks after
29     *  the parse is done
30     * @param bool &$suppressCache Set true if cache should be suppressed
31     * @return bool|void True or no return value to continue or false to abort
32     */
33    public function onApiMakeParserOptions( $options, $title, $params, $module,
34        &$reset, &$suppressCache
35    );
36}