定制 humweb/features 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

humweb/features

Composer 安装命令:

composer require humweb/features

包简介

Feature toggle package

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight Total Downloads Latest Version on Packagist Software License

Feature Toggle allows developers to toggle on/off features in the system using one or multiple Strategies.

Install

Via Composer

$ composer require humweb/features

Usage

DateTime Strategy

$features = new Features();

$features->create('test.feature', 'Example feature description')
    ->add('StrategyKeyString', 'DataTime', [
        'date'     => '2015-11-10',
        'operator' => '>'
    ])
    ->setThreshold(1);

if ($features->isEnabled('test.feature')) {
    // Do something special
}

DateTimeRange Strategy

$features = new Features();

$features->create('test.feature', 'Example feature description')
    ->add('StrategyKeyString', 'DataTimeRange', [
            'start'  =>'2100-11-10',
            'end'    => '2100-12-10',
            'strict' => false
    ])
    ->setThreshold(1);

if ($features->isEnabled('test.feature')) {
    // Do something special
}

DaysOfWeek mixed with DateTimeRange Strategy

$features = new Features();

$features->create('business.hours', 'Match days of week')
     ->add('DaysOpen', 'DaysOfWeek', [
         'days' => ['sat']
     ])
     ->add('StoreHours', 'DateTimeRange', [
         'start'  =>'9am',
         'end'    => '11pm',
         'strict' => true
     ])
     ->setThreshold(2);
    
if ($features->isEnabled('business.hours')) {
    // Do something special
}

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ryun@humboldtweb.com instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固