Download the PHP package tourze/wechat-work-intercept-rule-bundle without Composer
On this page you can find all versions of the php package tourze/wechat-work-intercept-rule-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/wechat-work-intercept-rule-bundle
More information about tourze/wechat-work-intercept-rule-bundle
Files in tourze/wechat-work-intercept-rule-bundle
Package wechat-work-intercept-rule-bundle
Short Description 企业微信聊天敏感词拦截规则管理组件
License MIT
Informations about the package wechat-work-intercept-rule-bundle
WechatWorkInterceptRuleBundle
中文
A Symfony bundle for managing WeChat Work sensitive word intercept rules. This bundle provides functionality to synchronize, manage, and apply sensitive word filtering rules for WeChat Work applications.
Table of Contents
- Features
- Installation
- Configuration
- Usage
- Entities
- InterceptRule Entity
- InterceptType Enum
- Commands
- Sync Intercept Rules
- API Requests
- Repository
- Event Listeners
- Advanced Usage
- Custom Rule Processing
- Bulk Operations
- Integration with External Systems
- Database Schema
- Cron Job
- Dependencies
- Testing
- Contributing
- License
- References
Features
- Intercept Rule Management: Create, update, and delete sensitive word rules
- Automatic Synchronization: Sync rules from WeChat Work API automatically
- Flexible Rule Types: Support for warning-only and intercept-and-block rule types
- Cron Job Integration: Automatic rule synchronization every 10 minutes
- Multi-Agent Support: Manage rules across multiple WeChat Work agents
- Doctrine Integration: Full ORM support with entities and repositories
Installation
Configuration
Add the bundle to your config/bundles.php:
Usage
Entities
InterceptRule Entity
The main entity for managing sensitive word rules:
InterceptType Enum
Defines the action to take when sensitive words are detected:
InterceptType::WARN: Warning and block sending (警告并拦截发送)InterceptType::NOTICE: Warning only (仅警告)
Commands
Sync Intercept Rules
Synchronize sensitive word rules from WeChat Work API:
This command:
- Fetches all intercept rules from WeChat Work API
- Creates or updates local rule entities
- Runs automatically every 10 minutes via cron job
- Supports multiple agents and corporations
API Requests
The bundle provides request classes for WeChat Work API integration:
Repository
Use the repository for database operations:
Event Listeners
The bundle includes event subscribers for handling rule-related events:
Advanced Usage
Custom Rule Processing
You can create custom processors for handling specific rule types:
Bulk Operations
For managing large numbers of rules:
Integration with External Systems
Example of integrating with external content filtering systems:
Database Schema
The bundle creates the following table:
Cron Job
The bundle automatically registers a cron job to sync rules every 10 minutes:
Dependencies
This bundle requires:
- PHP 8.1+
- Symfony 6.4+
- Doctrine ORM 3.0+
- WeChat Work Bundle
- Various Tourze utility bundles
Testing
Run the test suite:
Contributing
Contributions are welcome! Please submit pull requests or create issues for bugs and feature requests.
License
The MIT License (MIT). Please see License File for more information.
References
All versions of wechat-work-intercept-rule-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
monolog/monolog Version ^3.1
nesbot/carbon Version ^2.72 || ^3
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/serializer Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-direct-insert-bundle Version 1.0.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-enum-field-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/http-client-bundle Version 1.1.*
tourze/symfony-cron-job-bundle Version 1.1.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/wechat-work-bundle Version 1.1.*
tourze/wechat-work-contracts Version 1.0.*