benji07 / akismet-bundle
There is no license information available for the latest version (dev-master) of this package.
Symfony Benji07 AkismetBundle
Package info
github.com/benji07/Benji07AkismetBundle
Type:symfony-bundle
pkg:composer/benji07/akismet-bundle
dev-master
2012-03-11 10:17 UTC
Requires
- php: >=5.3.2
- symfony/framework-bundle: 2.*
This package is not auto-updated.
Last update: 2026-03-08 09:53:48 UTC
README
#Benji07AkismetBundle
Bundle to use akismet api in Symfony2
Configuration
[yml]
benji_akismet
key: your key
blog: your site homepage
Usage
[php]
$data = array(
'user_ip' => $comment->getUserIp(),
'user_agent' => $comment->getUserAgent(),
'referrer' => $comment->getReferrer(),
'comment_type' => 'comment',
'comment_author' => $comment->getUsername(),
'comment_author_email' => $comment->getEmail(),
'comment_content' => $comment->getContent()
);
// check if $comment is a spam
$this['akismet']->isSpam($data);
// submit a spam
$this['akismet']->submitSpam($data);
// submit a ham
$this['akismet']->submitHam($data);