MediaWiki REL1_41
MediaWiki\EditPage\SpamChecker Class Reference

Service to check if text (either content or a summary) qualifies as spam. More...

Public Member Functions

 __construct ( $spamRegex, $summaryRegex)
 
 checkContent (string $text)
 Check whether content text is considered spam.
 
 checkSummary (string $summary)
 Check whether summary text is considered spam.
 

Detailed Description

Service to check if text (either content or a summary) qualifies as spam.

Text qualifies as spam if it matches the global $wgSpamRegex Summaries qualify as spam if they match the global $wgSummarySpamRegex

Author
DannyS712
Since
1.35

Definition at line 14 of file SpamChecker.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\EditPage\SpamChecker::__construct ( $spamRegex,
$summaryRegex )
Parameters
string[]$spamRegex
string[]$summaryRegex

Definition at line 26 of file SpamChecker.php.

Member Function Documentation

◆ checkContent()

MediaWiki\EditPage\SpamChecker::checkContent ( string $text)

Check whether content text is considered spam.

Parameters
string$text
Returns
string|false Matching string or false

Definition at line 37 of file SpamChecker.php.

◆ checkSummary()

MediaWiki\EditPage\SpamChecker::checkSummary ( string $summary)

Check whether summary text is considered spam.

Parameters
string$summary
Returns
string|false Matching string or false

Definition at line 47 of file SpamChecker.php.


The documentation for this class was generated from the following file: