PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2019-05-16 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 102 This week: 65All time: 9,155 This week: 5Up
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
Nominee
Vote
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
Name: Marcel Pociot <contact>
Classes: 2 packages by
Country: Germany Germany
Age: ???
All time rank: 3252188 in Germany Germany
Week rank: 7 Up2 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:102
This week:65
All time:9,155
This week:5Up
User Comments (2)
Thats a very good class !
12 days ago (Josť Filipe Lopes Santos)
70%StarStarStarStar
Thats a very good class !
12 days ago (Josť Filipe Lopes Santos)
70%StarStarStarStar