定制 mablae/time-window-bundle 二次开发

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

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

mablae/time-window-bundle

Composer 安装命令:

composer require mablae/time-window-bundle

包简介

Symfony bundle for time based feature flags

README 文档

README

This bundle implements implements basically daytime based feature flags.

NOTICE This bundle is the result of quickly decoupling some logic we already had duplicated in serveral places of an legacy codebase. If you are looking for a full featured Feature Toggle Bundle for Symfony you are probably better using https://github.com/qandidate-labs/qandidate-toggle-bundle

Feel free to contribute or leave feedback in the issues. <3

##Installation

Step 1: Install DatetimepickerBundle

php composer.phar require mablae/datetimepicker-bundle

Step 2: Enable the bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Mablae\TimeWindowBundle\MablaeTimeWindowBundle(),
    );
}

Step 3: Configure your named time windows:

# app/config/config.yml
mablae_time_window_:
    enabled: ~
    time_windows:
      in_the_morning:
        - { startTime : '06:00' , endTime: '08:00' }

At the moment there is no proper overlapping checks or sorting. The timewindow must be defined in correct order. The first timewindow that returns active wins.

Step 4: Use the voter service to ask, if a time-window is active

<?php 
/* ... */ 

$timeWindowService = $this->get('mablae_time_window.service');

$itsInTheMorning = $timeWindowService->isTimeWindowActive('in_the_morning')

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固