3 namespace MediaWiki\Api\Hook
;
5 use MediaWiki\Api\ApiBase
;
6 use MediaWiki\Parser\ParserOptions
;
7 use MediaWiki\Title\Title
;
8 use Wikimedia\ScopedCallback
;
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "ApiMakeParserOptions" to register handlers implementing this interface.
14 * @stable to implement
17 interface ApiMakeParserOptionsHook
{
19 * This hook is called from ApiParse and ApiExpandTemplates to allow
20 * extensions to adjust the ParserOptions before parsing.
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
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
33 public function onApiMakeParserOptions( $options, $title, $params, $module,
34 &$reset, &$suppressCache