Debian Codegraph @

extensions/AbuseFilter/includes/Hooks/AbuseFilterContentToStringHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\AbuseFilter\Hooks;
4
5 use MediaWiki\Content\Content;
6
7 interface AbuseFilterContentToStringHook {
8 /**
9 * Hook runner for the `AbuseFilter-contentToString` hook
10 *
11 * Called when converting a Content object to a string to which
12 * filters can be applied. If the hook function returns true, Content::getTextForSearchIndex()
13 * will be used for non-text content.
14 *
15 * @param Content $content
16 * @param ?string &$text Set this to the desired text
17 * @return bool|void True or no return value to continue or false to abort
18 */
19 public function onAbuseFilter_contentToString(
20 Content $content,
21 ?string &$text
22 );
23 }