SpamFilter __construct(
)
|
|
The SpamFilter class instantiation function.
int filterMessage(
string
$author, string
$email, string
$website, string
$body, object
$receiver, string
$ip
)
|
|
The function for processing a message to see if it might be SPAM
returns:
- if the message is SPAM
- if the message might be SPAM (it will be marked for moderation)
- if the message is not SPAM
Parameters:
string |
$author: |
Author field from the posting |
string |
$email: |
Email field from the posting |
string |
$website: |
Website field from the posting |
string |
$body: |
The text of the comment |
object |
$receiver: |
The object on which the post was made |
string |
$ip: |
the IP address of the comment poster |
array getOptionsSupported(
)
|
|
The admin options interface
void getWords(
$text, [
$notUnique = false]
)
|
|
Parameters:
void handleOption(
string
$option, mixed
$currentValue
)
|
|
Handles custom formatting of options for Admin
Parameters:
string |
$option: |
the option name of the option to be processed |
mixed |
$currentValue: |
the current value of the option (the "before" value) |
bool hasSpamPattern(
string
$text
)
|
|
Tests to see if the text contains any of the SPAM trigger patterns
Parameters:
string |
$text: |
The message to be parsed |
bool hasSpamWords(
string
$text
)
|
|
Tests to see if the text contains any of the list of SPAM trigger words
Parameters:
string |
$text: |
The text of the message to be examined. |