承接 hotflo/feature-toggle-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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/

统计信息

  • 总下载量: 4.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-06