Trackback
[ class tree: Trackback ] [ index: Trackback ] [ all elements ]

Class: Services_Trackback_SpamCheck

Source Location: /Services_Trackback-0.7.1/Services/Trackback/SpamCheck.php

Class Overview


SpamCheck Base class for Services_Trackback spam protection modules.


Author(s):

Version:

  • Release: 0.7.1

Copyright:

  • 2005-2006 The PHP Group

Variables

Methods


Child classes:

Services_Trackback_SpamCheck_Wordlist
Wordlist Module for spam detecion using a word list.
Services_Trackback_SpamCheck_Regex
Regex Module for spam detecion using perl compatible regular expressions.
Services_Trackback_SpamCheck_DNSBL
DNSBL Module for spam detecion using DNSBL.
Services_Trackback_SpamCheck_Mock
Mock
Services_Trackback_SpamCheck_SURBL
SURBL Module for spam detecion using SURBL.
Services_Trackback_SpamCheck_Akismet
Akismet Module for spam detecion using http://akismet.com.

Inherited Variables

Inherited Methods


Class Details

[line 50]
SpamCheck Base class for Services_Trackback spam protection modules.


[ Top ]


Class Variables

$_options = array(
        'continuous'    => false,
        'sources'       => array(),)

[line 61]

Options for the spam check module. General and module specific.
  • Since: 0.5.0
  • Access: protected

Type:   array


[ Top ]

$_results = array()

[line 76]

Array of results, indexed analogue to the 'sources' option (boolean result value per source).
  • Access: protected

Type:   array


[ Top ]



Method Detail

check   [line 138]

bool check( Services_Trackback $trackback)

Check for spam using this module.

This method is utilized by a Services_Trackback object to check for spam. Generally this method may not be overwritten, but it can be, if necessary. This method calls the _checkSource() method for each source defined in the $_options array (depending on the 'continuous' option), saves the results and returns the spam status determined by the check.

  • Return: Whether the checked object is spam or not.
  • Since: 0.5.0
  • Access: public

Overridden in child classes as:

Services_Trackback_SpamCheck_Wordlist::check()
Check for spam using this module.
Services_Trackback_SpamCheck_Regex::check()
Check for spam using this module.
Services_Trackback_SpamCheck_Mock::check()
Check for spam using this module.
Services_Trackback_SpamCheck_Akismet::check()
Check for spam using this module.

Parameters:

Services_Trackback   $trackback   —  The trackback to check.

[ Top ]

create   [line 97]

Services_Trackback_SpamCheck create( string $type, [array $options = null])

Factory.

Create a new instance of a spam protection module.

  • Return: The newly created SpamCheck object.
  • Since: 0.5.0
  • Access: public

Parameters:

string   $type   —  Name of a SpamCheck driver
array   $options   —  An array of options for this spam protection module. General options are 'continuous': Whether to continue checking more sources if a match has been found. 'sources': List of blacklist nameservers. Indexed

[ Top ]

getResults   [line 169]

array getResults( )

Get spam check results.

Receive the results determined by the spam check.

  • Return: Array of specific spam check results.
  • Since: 0.5.0
  • Access: public

[ Top ]

reset   [line 186]

null reset( )

Reset results.

Reset results to reuse SpamCheck.

  • Since: 0.5.0
  • Access: public

Overridden in child classes as:

Services_Trackback_SpamCheck_DNSBL::reset()
Reset results.
Services_Trackback_SpamCheck_SURBL::reset()
Reset results.

[ Top ]

_checkSource   [line 205]

bool _checkSource( mixed $source, Services_Trackback $trackback)

Check a specific source if a trackback has to be considered spam.
  • Return: True if trackback is spam, false, if not, Services_Trackback_Exception on error.
  • Abstract:
  • Since: 0.5.0
  • Access: protected

Overridden in child classes as:

Services_Trackback_SpamCheck_Wordlist::_checkSource()
Check a specific source if a trackback has to be considered spam.
Services_Trackback_SpamCheck_Regex::_checkSource()
Check a specific source if a trackback has to be considered spam.
Services_Trackback_SpamCheck_DNSBL::_checkSource()
Check a specific source if a trackback has to be considered spam.
Services_Trackback_SpamCheck_SURBL::_checkSource()
Check a specific source if a trackback has to be considered spam.
Services_Trackback_SpamCheck_Akismet::_checkSource()
Check a specific source if a trackback has to be considered spam.

Parameters:

mixed   $source   —  Element of the _sources array to check.
Services_Trackback   $trackback   —  The trackback to check.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:51:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.