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

Class: Services_Trackback_SpamCheck_Akismet

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

Class Overview

Services_Trackback_SpamCheck
   |
   --Services_Trackback_SpamCheck_Akismet

Akismet Module for spam detecion using http://akismet.com.


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 62]
Akismet Module for spam detecion using http://akismet.com.


[ Top ]


Class Variables

$_options = array('continuous'    => false,
                          'sources'       => array('rest.akismet.com/1.1/'),// URL of the blog sending the Akismet request
'url'=>'',// WordPress.com API key to use
'key'=>'','elements'=>array('title','excerpt','blog_name','url','host'))

[line 74]

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

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 105]

void __construct( [array $options = null])

Constructor.

Create a new instance of the Akismet 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 Akismet servers URIs.

[ Top ]

check   [line 131]

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 ]

submitHam   [line 184]

bool submitHam( Services_Trackback $trackback, [int $sourceId = 0])

Submit a valid, non spam trackback

Parameters:

Services_Trackback   $trackback   —  The trackback
int   $sourceId   —  The source ID.

[ Top ]

submitSpam   [line 163]

bool submitSpam( Services_Trackback $trackback, [int $sourceId = 0])

Submit an invalid, spammy trackback

Parameters:

Services_Trackback   $trackback   —  The trackback
int   $sourceId   —  The source ID.

[ Top ]

verifyKey   [line 202]

bool verifyKey( )

Verify your Akismet key is valid

[ Top ]

_checkSource   [line 225]

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

_sendAkismetRequest   [line 249]

string _sendAkismetRequest( string $baseUri, Services_Trackback $trackback, [string $action = 'verify-key'])

Submits a
  • Access: protected

Parameters:

string   $baseUri   —  URI of akisment service
Services_Trackback   $trackback   —  The trackback in question
string   $action   —  Action to do

[ Top ]


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