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

Class: Services_Trackback_SpamCheck_Regex

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

Class Overview

Services_Trackback_SpamCheck
   |
   --Services_Trackback_SpamCheck_Regex

Regex Module for spam detecion using perl compatible regular expressions.


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]
Regex Module for spam detecion using perl compatible regular expressions.


[ Top ]


Class Variables

$_options = array(
        'continuous'    => false,
        'sources'       => array(
            '(acne|adipex|anal|blackjack|cash|casino|cigar|closet|daystore|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','url',),'delimiter'=>'@','modifier'=>'i','minmatches'=>1,)

[line 65]

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

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 104]

void __construct( [array $options = null])

Constructor.

Create a new instance of the DNSBL spam protection module.

  • 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 nameservers. 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 130]

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

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
  • 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.