hotflo/feature-toggle-bundle
最新稳定版本:v0.1.1
Composer 安装命令:
composer require hotflo/feature-toggle-bundle
包简介
A Symfony2 Bundle implementing the https://github.com/JoshuaEstes/FeatureToggle library
README 文档
README
A Symfony2 Bundle implementing the https://github.com/JoshuaEstes/FeatureToggle library
Install
Install with composer:
composer.phar require hotflo/feature-toggle-bundle
Add to your AppKernel.php
new Hotflo\FeatureToggleBundle\HotfloFeatureToggleBundle(),
Configuration
To use this bundle you should configure toggles and feature in the config.yml. You can use a class or a service as toggle and then use the configured toggles in your features.
Full reference:
hotflo_feature_toggle:
toggles:
generic:
class: JoshuaEstes\Component\FeatureToggle\Toggle\FeatureToggleGeneric
options:
enabled: true
generic_service:
type: service
service: hotflo_feature_toggle.generic_feature_toggle
features:
dashboard:
toggle: generic_service
Usage
In your controller, the feature container is available in the Symfony2 service container.
Example:
$this->get('hotflo_feature_toggle.feature_container')->getFeature('dashboard');
The configured feature toggles are also available in the Symfony2 service container.
$this->get('hotflo_feature_toggle.feature_toggle_container')->getFeatureToggle('generic');
Test
Start the tests by running PHP Unit:
./bin/phpunit
More documentation
This bundle depends on the FeatureToggle library. The documentation of this library can be found here: http://feature-toggle.readthedocs.org/en/latest/
hotflo/feature-toggle-bundle 适用场景与选型建议
hotflo/feature-toggle-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.1k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 07 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 hotflo/feature-toggle-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hotflo/feature-toggle-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-06