vaneavasco/toggle

Simple feature toggles package

dev-master 2017-10-10 19:36 UTC

This package is not auto-updated.

Last update: 2021-05-04 11:30:23 UTC


README

Build status

Example

$featureConfig   = require_once 'config.php';
$featureToggle   = FeatureToggle::build($featureConfig);
$featuresToCheck = ['myFeature', 'myOtherFeature'];

foreach ($featuresToCheck as $feature) {
    if ($featureToggle->isEnabled($feature)) {
        echo "$feature is enabled \n";
    } else {
        echo "$feature is disabled \n";
    }
}