PHP code example of npg / bandiera-client-php

1. Go to this page and download the library: Download npg/bandiera-client-php 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/ */

    

npg / bandiera-client-php example snippets




iera = new Nature\Bandiera\Client('http://bandiera-demo.herokuapp.com');

if ($bandiera->isEnabled('my_app', 'super_new_feature')) {
    // show the super new feature!
}

$bandiera->isEnabled('my_app', 'super_new_feature', [
    'user_id' => 1234567,
    'user_group' => 'Administrators'
]);

Nature\Bandiera\Client::getAll($params = []);

Nature\Bandiera\Client::getFeaturesForGroup($group, $params = []);

Nature\Bandiera\Client::getFeature($group, $feature, $params = []);
json
{
    "pg/bandiera-client-php": "~1.0"
    }
}