| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 175 lines (5 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SpamRegexBatch:: (7 methods):
buildRegexes()
validateRegexes()
stripLines()
buildSafeRegexes()
getBadLines()
regexesFromText()
regexesFromMessage()
Class: SpamRegexBatch - X-Ref
Utility class for working with blacklists| buildRegexes( $lines, BaseBlacklist $blacklist, $batchSize=4096 ) X-Ref |
| Build a set of regular expressions matching URLs with the list of regex fragments. Returns an empty list if the input list is empty. param: array $lines list of fragments which will match in URLs param: BaseBlacklist $blacklist param: int $batchSize largest allowed batch regex; return: array |
| validateRegexes( $regexes ) X-Ref |
| Confirm that a set of regexes is either empty or valid. param: $regexes array set of regexes return: bool true if ok, false if contains invalid lines |
| stripLines( $lines ) X-Ref |
| Strip comments and whitespace, then remove blanks param: $lines array return: array |
| buildSafeRegexes( $lines, BaseBlacklist $blacklist, $fileName=false ) X-Ref |
| Do a sanity check on the batch regex. param: $lines string unsanitized input lines param: $blacklist BaseBlacklist param: $fileName bool|string optional for debug reporting return: array of regexes |
| getBadLines( $lines, BaseBlacklist $blacklist ) X-Ref |
| Returns an array of invalid lines param: array $lines param: $blacklist BaseBlacklist return: array of input lines which produce invalid input, or empty array if no problems |
| regexesFromText( $source, BaseBlacklist $blacklist, $fileName=false ) X-Ref |
| Build a set of regular expressions from the given multiline input text, with empty lines and comments stripped. param: $source string param: $blacklist BaseBlacklist param: $fileName bool|string optional, for reporting of bad files return: array of regular expressions, potentially empty |
| regexesFromMessage( $message, BaseBlacklist $blacklist ) X-Ref |
| Build a set of regular expressions from a MediaWiki message. Will be correctly empty if the message isn't present. param: $message string param: $blacklist BaseBlacklist return: array of regular expressions, potentially empty |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |