PHP Feature Switch: Activate, deactivate and store feature values

Recommend this page to a friend!
  Info   View files Documentation   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 119 All time: 9,177 This week: 446Up
Version License PHP version Categories
feature-switch 1.0MIT/X Consortium ...5PHP 5, Data types, Configuration
Description Author

This package can activate, deactivate and store feature values.

It provides a class to set feature values to be associated to a name using a fluent interface.

Another class is provided to activate, deactivate, get features and save their values to a storage container implemented by a separate object passed to the class as a constructor parameter.

Innovation Award
PHP Programming Innovation award nominee
May 2019
Number 2
Many applications have features that can be enabled or not, in some cases depending on the user of the application.

This package implements meants to create application features that can be activated or not, as well a means to customize the way the feature activation state to a given storage container.

Manuel Lemos
Picture of Marcel Pociot
Name: Marcel Pociot <contact>
Classes: 2 packages by
Country: Germany Germany
Age: ???
All time rank: 3160183 in Germany Germany
Week rank: 248 Up10 in Germany Germany Up
Innovation award
Innovation award
Nominee: 2x

Details

PHP Feature Switcher (WIP)

A PHP feature switcher / feature toggle library with a fluent, easy to use, API.

$switch = new FeatureSwitch(new ArrayStorage());
$switch->activate(
    (new Feature())
        ->name('Chat')
        ->percentage(50)
);

License

The PHP Feature Switcher is free software licensed under the MIT license.

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (2 files)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageMpociot (1 directory)

  Files folder image Files  /  src  /  Mpociot  
File Role Description
Files folder imageFeatureSwitch (3 files, 1 directory)

  Files folder image Files  /  src  /  Mpociot  /  FeatureSwitch  
File Role Description
Files folder imageStorage (2 files)
  Plain text file Feature.php Class Class source
  Plain text file FeatureSwitch.php Class Class source
  Plain text file NullFeature.php Class Class source

  Files folder image Files  /  src  /  Mpociot  /  FeatureSwitch  /  Storage  
File Role Description
  Plain text file ArrayStorage.php Class Class source
  Plain text file StorageContract.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file FeatureSwitchTest.php Class Class source
  Plain text file FeatureTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:119
This week:0
All time:9,177
This week:446Up
User Comments (2)
Thats a very good class !
1 year ago (Josť Filipe Lopes Santos)
70%StarStarStarStar
Thats a very good class !
1 year ago (Josť Filipe Lopes Santos)
70%StarStarStarStar
 

For more information send a message to info at phpclasses dot org.