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

Class: Services_Trackback_SpamCheck_Wordlist

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

Class Overview

Services_Trackback_SpamCheck
   |
   --Services_Trackback_SpamCheck_Wordlist

Wordlist Module for spam detecion using a word list.


Author(s):

Version:

  • Release: 0.7.1

Copyright:

  • 2005-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Trackback_SpamCheck

Services_Trackback_SpamCheck::check()
Check for spam using this module.
Services_Trackback_SpamCheck::create()
Factory.
Services_Trackback_SpamCheck::getResults()
Get spam check results.
Services_Trackback_SpamCheck::reset()
Reset results.
Services_Trackback_SpamCheck::_checkSource()
Check a specific source if a trackback has to be considered spam.

Class Details

[line 53]
Wordlist Module for spam detecion using a word list.


[ Top ]


Class Variables

$_options = array(
        'continuous'    => false,
        'sources'       => array(
            'acne',
            'adipex',
            'anal',
            'blackjack',
            'cash',
            'casino',
            'cigar',
            'closet',
            'daystore',
            'diet',
            'drugs',
            'erection',
            'fundslender',
            'gambling',
            'hire',
            'hydrocodone',
            'investing',
            'lasik',
            'loan',
            'mattress',
            'mortgage',
            'naproxen',
            'neurontin',
            'payday',
            'penis',
            'pharma',
            'phentermine',
            'poker',
            'porn',
            'rheuma',
            'roulette',
            'sadism',
            'sex',
            'smoking',
            'texas hold',
            'tramadol',
            'uxury',
            'viagra',
            'vioxx',
            'weight loss',
            'xanax',
            'zantac',
        ),'elements'=>array('title','excerpt','blog_name',),'comparefunc'=>array('Services_Trackback_SpamCheck_Wordlist','_stripos'),'minmatches'=>1,)

[line 65]

Options for the Wordlist.
  • Since: 0.5.0
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 142]

Services_Trackback_SpamCheck_WordList __construct( [array $options = null])

Constructor.

Create a new instance of the Wordlist spam protection module.

  • Return: The newly created 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 blacklist servers. Indexed. 'comparefunc': A compare function callback with parameters $haystack, $needle (like 'stripos'). 'minmatches': How many words have to be found to consider spam.

[ Top ]

check   [line 168]

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

Overrides Services_Trackback_SpamCheck::check() (Check for spam using this module.)

Parameters:

Services_Trackback   $trackback   —  The trackback to check.

[ Top ]

_checkSource   [line 201]

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.
  • Since: 0.5.0
  • Access: protected

Overrides Services_Trackback_SpamCheck::_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.