Overview
Acts as an interface to the Akismet spam-checking service.
You will need to register for an Akismet API key to use the service. Once you have that, you can use the service like so:
<?php
$akismet = Solar::factory('Solar_Service_Akismet', array(
'key' => 'apikeyvalue',
'blog' => 'http://example.com',
));
$comment = array(
'permalink' => 'http://example.net/blog/read/1',
'comment_type' => 'comment',
'comment_author' => 'nobody',
'comment_author_email' => 'nobody@example.com',
'comment_author_url' => 'http://example.org/nobody.html',
'comment_content' => 'The comment text.',
);
$is_spam = $akismet->commentCheck($data);
Configuration Keys
Constants
None.
Public Properties
The Solar_Service_Akismet class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_Service_Akismet class.
You can also view the list of all public, protected, and private methods.
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
commentCheck()
-
Checks the comment data with Akismet to see if it is spam.
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
getResponse()
-
Get the most-recent response sent from Akismet.
-
locale()
-
Looks up class-specific locale strings based on a key.
-
submitHam()
-
Submits data to Akismet to establish it as ham (i.e., not spam).
-
submitSpam()
-
Submits data to Akismet to establish it as spam.
-
verifyKey()
-
Verifies the API key with Akismet.