Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
33 lines
948 B
PHP
33 lines
948 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Api\Hook;
|
|
|
|
use ApiBase;
|
|
use ParserOptions;
|
|
use Title;
|
|
use Wikimedia\ScopedCallback;
|
|
|
|
/**
|
|
* @stable for implementation
|
|
* @ingroup Hooks
|
|
*/
|
|
interface ApiMakeParserOptionsHook {
|
|
/**
|
|
* This hook is called from ApiParse and ApiExpandTemplates to allow
|
|
* extensions to adjust the ParserOptions before parsing.
|
|
*
|
|
* @since 1.35
|
|
*
|
|
* @param ParserOptions $options
|
|
* @param Title $title Title to be parsed
|
|
* @param array $params Parameter array for the API module
|
|
* @param ApiBase $module API module (which is also a ContextSource)
|
|
* @param ScopedCallback|null &$reset Set to a ScopedCallback used to reset any hooks after
|
|
* the parse is done
|
|
* @param bool &$suppressCache Set true if cache should be suppressed
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
*/
|
|
public function onApiMakeParserOptions( $options, $title, $params, $module,
|
|
&$reset, &$suppressCache
|
|
);
|
|
}
|