1. Go to this page and download the library: Download davispeixoto/featuretoggle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
Davispeixoto\FeatureToggler\FeatureToggler;
...
$toggler = new FeatureToggler('path/to/my_config_file.php');
if($toggler->isEnabled('my_feature')) {
// do the feature here
}
...
// for multidimensional config array
if($toggler->isEnabled('my_other_feature.en_us')) {
// new code here
} else {
// old code here
}
sh
php composer.phar update
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.