https://github.com/vaneavasco/toggle
Feature toggles
https://github.com/vaneavasco/toggle
feature-flags feature-toggle
Last synced: about 1 month ago
JSON representation
Feature toggles
- Host: GitHub
- URL: https://github.com/vaneavasco/toggle
- Owner: vaneavasco
- License: mit
- Created: 2017-10-02T19:17:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T19:37:10.000Z (over 8 years ago)
- Last Synced: 2024-05-16T01:50:40.427Z (almost 2 years ago)
- Topics: feature-flags, feature-toggle
- Language: PHP
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple feature toggles
[![Build status][ico-travis]][link-travis]
Example
```php
$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";
}
}
```
[ico-travis]: https://travis-ci.org/vaneavasco/toggle.svg?branch=master
[link-travis]: https://travis-ci.org/vaneavasco/toggle