dev-master
9999999-dev https://github.com/humweb/featuresFeature toggle package
MIT
The Requires
- php >=5.3.0
The Development Requires
by Ryan Shofner
features humweb
Wallogit.com
2017 © Pedro Peláez
Feature toggle package
Feature Toggle allows developers to toggle on/off features in the system using one or multiple Strategies., (*2)
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 }
``` 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 }
Please see CHANGELOG for more information what has changed recently., (*8)
bash
$ composer test, (*9)
Please see CONTRIBUTING for details., (*10)
If you discover any security related issues, please email ryun@humboldtweb.com instead of using the issue tracker., (*11)
The MIT License (MIT). Please see License File for more information., (*12)
Feature toggle package
MIT
features humweb