lwiesel/feature-checker-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

lwiesel/feature-checker-bundle

最新稳定版本:v1.1.0

Composer 安装命令:

composer require lwiesel/feature-checker-bundle

包简介

Enable and disable functional features in Symfony2 applications.

README 文档

README

Packagist Software License Build Status Coverage Status Quality Score HHVM Total Downloads

SensioLabsInsight

Define features, and check if they are activated or not in your Symfony2 application.

Usage

Define a feature configuration in your config.yml.

# app/config/config.yml

feature_checker:
    features:
        feature1: true
        feature2: false
        feature3:
            feature31: true
            feature32: true

Then use the features names in controller annotations. Only the allowed features will execute the action.

<?php
// src/AppBundle/Controller/DefaultController.php

namespace AppBundle\Controller;

use LWI\FeatureCheckerBundle\Annotations\MustHaveFeature;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    /**
     * @MustHaveFeature("feature1")
     */
    public function indexAction()
    {
        return $this->render('default/index.html.twig');
    }
}

Sub-features can be checked with this notation:

    /**
     * @MustHaveFeature("feature1")
     * @MustHaveFeature("feature3.feature31")
     */
    public function secondAction()
    {
        return $this->render('default/second.html.twig');
    }

You can also test whole feature sets. A feature set is considered enabled when all sub-features -at any sub-level- is enabled.

    /**
     * @MustHaveFeature("feature3")
     */
    public function thirdAction()
    {
        return $this->render('default/third.html.twig');
    }
}

Installation

Please see Full documentation for details.

Testing

$ bin/phpspec run

Contributing

Please see CONTRIBUTING for details.

Changelog

Please see CHANGELOG for details.

Security

If you discover any security related issues, please email wiesel.laurent@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 225
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固