MediaWiki REL1_37
|
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. | |
Static Private Member Functions | |
static | checkInternal (string $text, array $regexes) |
Private Attributes | |
string[] | $spamRegex |
string[] | $summaryRegex |
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
Definition at line 14 of file SpamChecker.php.
MediaWiki\EditPage\SpamChecker::__construct | ( | $spamRegex, | |
$summaryRegex | |||
) |
string[] | $spamRegex | |
string[] | $summaryRegex |
Definition at line 26 of file SpamChecker.php.
References MediaWiki\EditPage\SpamChecker\$spamRegex, and MediaWiki\EditPage\SpamChecker\$summaryRegex.
MediaWiki\EditPage\SpamChecker::checkContent | ( | string | $text | ) |
Check whether content text is considered spam.
string | $text |
Definition at line 37 of file SpamChecker.php.
References MediaWiki\EditPage\SpamChecker\checkInternal().
|
staticprivate |
string | $text | |
array | $regexes |
Definition at line 56 of file SpamChecker.php.
References $matches.
Referenced by MediaWiki\EditPage\SpamChecker\checkContent(), and MediaWiki\EditPage\SpamChecker\checkSummary().
MediaWiki\EditPage\SpamChecker::checkSummary | ( | string | $summary | ) |
Check whether summary text is considered spam.
string | $summary |
Definition at line 47 of file SpamChecker.php.
References MediaWiki\EditPage\SpamChecker\checkInternal().
|
private |
Definition at line 17 of file SpamChecker.php.
Referenced by MediaWiki\EditPage\SpamChecker\__construct().
|
private |
Definition at line 20 of file SpamChecker.php.
Referenced by MediaWiki\EditPage\SpamChecker\__construct().