phpDocumentor Comment
Classes
[ class tree: Comment ] [ index: Comment ] [ all elements ]

Class: AkismetApi

Source Location: /modules/comment/classes/AkismetApi.class

Class AkismetApi

Class Overview

Utility functions for communicating with the Akismet service.

Located in /modules/comment/classes/AkismetApi.class [line 36]



		
		
		
		

Methods

[ Top ]
Method Summary
array   checkComment()   Check a comment to see if it's spam.
GalleryStatus   submitHam()   Submit this comment back to Akismet as ham (not spam).
GalleryStatus   submitSpam()   Submit this comment back to Akismet as spam.
array   verifyApiKey()   Verify an Akismet API key.
string   _getUserAgent()   Internal helper method to get the user agent in the form that Akismet prefers.
array   _request()   Internal helper method used to make requests to Akismet and return the body, status and header values.
array   _submit()   Internal helper method used to submit comments back to Akismet to change their status.

[ Top ]
Methods
checkComment  [line 43]

  array checkComment( &$comment, GalleryComment $comment  )

Check a comment to see if it's spam.

Parameters:
GalleryComment   $comment:  a reference to a GalleryComment instance
   &$comment: 

API Tags:
Return:  GalleryStatus a status code true if the comment is spam.


[ Top ]
submitHam  [line 73]

  GalleryStatus submitHam( &$comment, GalleryComment $comment  )

Submit this comment back to Akismet as ham (not spam).

Parameters:
GalleryComment   $comment:  a reference to a GalleryComment instance
   &$comment: 

API Tags:
Return:  a status code


[ Top ]
submitSpam  [line 64]

  GalleryStatus submitSpam( &$comment, GalleryComment $comment  )

Submit this comment back to Akismet as spam.

Parameters:
GalleryComment   $comment:  a reference to a GalleryComment instance
   &$comment: 

API Tags:
Return:  a status code


[ Top ]
verifyApiKey  [line 83]

  array verifyApiKey( string $apiKey  )

Verify an Akismet API key.

Parameters:
string   $apiKey:  the api key

API Tags:
Return:  GalleryStatus a status code true if the api key is valid


[ Top ]
_getUserAgent  [line 209]

  string _getUserAgent( )

Internal helper method to get the user agent in the form that Akismet prefers.


API Tags:
Return:  the user agent string (eg: "Gallery 2.3 | Comment 1.1.3")
Access:  private


Redefined in descendants as:

[ Top ]
_request  [line 145]

  array _request( string $type, &$comment, bool $includeBrowserSpecificDetails, GalleryComment $comment  )

Internal helper method used to make requests to Akismet and return the body, status and header values.

Parameters:
string   $type:  the type of Akismet request (legal values are 'comment-check', 'submit-ham', 'submit-spam')
GalleryComment   $comment:  a reference to a GalleryComment instance
bool   $includeBrowserSpecificDetails:  set to true to pass along specific details from the request that triggered this action (such as the USER_AGENT, etc). Only set this to true if the user initiatiating the call to _request is the one who originated the comment.
   &$comment: 

API Tags:
Return:  GalleryStatus a status code string the HTTP response body string the HTTP response status string the HTTP response headers
Access:  private


Redefined in descendants as:

[ Top ]
_submit  [line 115]

  array _submit( string $action, &$comment, GalleryComment $comment  )

Internal helper method used to submit comments back to Akismet to change their status.

Parameters:
string   $action:  the Akismet action to take (legal values are 'submit-spam' and 'submit-ham'
GalleryComment   $comment:  a reference to a GalleryComment instance
   &$comment: 

API Tags:
Return:  GalleryStatus a status code
Access:  private


[ Top ]

Documentation generated on Fri, 03 Oct 2008 04:44:07 -0700 by phpDocumentor 1.3.0RC6