dwo / flagging_bundle
此包已被废弃,不再维护。没有建议的替代包。
:待办事项
v0.2.9
2016-11-10 18:35 UTC
Requires
- php: >=5.4
- dwo/flagging: ~0.2@dev
- dwo/flagging_voters: ~1.0@dev
- dwo/tagged_services: ~1.0
- symfony/framework-bundle: >=2.4|>=3.0
Requires (Dev)
- phpunit/phpunit: ~4.6
- symfony/expression-language: ~2.4
README
FeatureFlaggingBundle
:待办事项
自用功能管理器
替换功能管理器
dwo_flagging: manager: feature: my_services.flagging_manager
use Dwo\Flagging\Model\FeatureManagerInterface; class MyFlaggingManager implements FeatureManagerInterface { ... }
动态功能
动态功能最佳案例是数据库和缓存层。以 DoctrineCacheBundle 为例。此案例使用 php 文件缓存和 dbal 连接。
使用 DoctrineCacheBundle
- composer install
composer require doctrine/doctrine-cache-bundle
- 将 Bundle 添加到 Kernel
// app/AppKernel.php public function registerBundles() { // ... $bundles[] = new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(); return $bundles; }
- 包含配置
imports: - { resource: @DwoFlaggingBundle/Resources/config/dwo_flagging.yml }
- 替换功能管理器
manager: feature: dwo_flagging.manager.feature.cache
缓存清除
要清除缓存,请使用 DoctrineCacheBundle FlushCommand
php app/console doctrine:cache:flush flagging