zuoan-link/filtering-of-sensitive-words
Composer 安装命令:
composer require zuoan-link/filtering-of-sensitive-words
包简介
filter sensitive words
README 文档
README
安装扩展
composer require zuoan-link/filtering-of-sensitive-words
如果你需要手动引入
require './vendor/autoload.php';
use DfaFilter\SensitiveHelper;
实例化
// get one helper
$handle = new SensitiveHelper();
检测是否含有敏感词
$islegal = $handle->islegal($content);
敏感词过滤
// 敏感词替换为***为例
$filterContent = $handle->replace($content, '***');
获取文字中的敏感词
// 获取内容中所有的敏感词
$sensitiveWordGroup = $handle->getBadWord($content);
// 仅且获取一个敏感词
$sensitiveWordGroup = $handle->getBadWord($content, 1);
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-15