benji07/akismet-bundle
Composer 安装命令:
composer require benji07/akismet-bundle
包简介
Symfony Benji07 AkismetBundle
README 文档
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);
统计信息
- 总下载量: 45.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2012-03-11