2017 © Pedro Peláez
 

library features

Feature toggle package

image

humweb/features

Feature toggle package

  • Friday, July 17, 2015
  • by ryun
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Features Toggle

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight Total Downloads Latest Version on Packagist Software License, (*1)

Feature Toggle allows developers to toggle on/off features in the system using one or multiple Strategies., (*2)

Install

Via Composer, (*3)

``` bash $ composer require humweb/features, (*4)


## Usage #### DateTime Strategy ``` php $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

``` php $features = new Features();, (*5)

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

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


#### DaysOfWeek mixed with DateTimeRange Strategy ``` php $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., (*8)

Testing

bash $ composer test, (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Security

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

Credits

License

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

The Versions

17/07 2015

dev-master

9999999-dev https://github.com/humweb/features

Feature toggle package

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

features humweb