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

Class: Services_Trackback_SpamCheck

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

Class Overview


SpamCheck Base class for Services_Trackback spam protection modules.


Author(s):

Version:

  • Release: @package_version@

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_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 56]
SpamCheck Base class for Services_Trackback spam protection modules.


[ Top ]


Class Variables

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

[line 66]

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

Type:   array


[ Top ]

$_results = array()

[line 80]

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

Type:   array


[ Top ]



Method Detail

check   [line 136]

bool check( $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()
Services_Trackback_SpamCheck_Regex::check()
Services_Trackback_SpamCheck_Akismet::check()

Parameters:

   $trackback   — 

[ Top ]

create   [line 99]

object(Services_Trackback_SpamCheck) &create( $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:

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 different sources for this module to check (eg. blacklist URLs, word arrays,...). All further options depend on the specific module.
   $type   — 

[ Top ]

getResults   [line 163]

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 180]

null reset( )

Reset results.

Reset results to reuse SpamCheck.

  • Since: 0.5.0
  • Access: public

Overridden in child classes as:

Services_Trackback_SpamCheck_SURBL::reset()
Reset results.

[ Top ]

_checkSource   [line 199]

bool _checkSource( mixed $source, object(Services_Trackback) $trackback)

Check a specific source if a trackback has to be considered spam.

Check a specific source if a trackback has to be considered spam.

  • Return: True if trackback is spam, false, if not, PEAR_Error on error.
  • Abstract:
  • Since: 0.5.0
  • Access: protected

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:36:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.