Download the PHP package npg/bandiera-client-php without Composer
On this page you can find all versions of the php package npg/bandiera-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download npg/bandiera-client-php
More information about npg/bandiera-client-php
Files in npg/bandiera-client-php
Package bandiera-client-php
Short Description Bandiera is a simple, stand-alone feature flagging service that is not tied to any existing web framework or language. This is a client for talking to the web service.
License MIT
Homepage https://github.com/nature/bandiera
Informations about the package bandiera-client-php
Bandiera PHP Client
This is a client for talking to the Bandiera feature flagging service from a PHP application.
This client is compatible with the v2 Bandiera API.
Installation
Installation is done via composer. In your composer.json
file add:
Usage
You can interact with the Bandiera server like so:
The Nature\Bandiera\Client::isEnabled
command takes two main arguments - the 'feature group',
and the 'feature name'. This is because in Bandiera, features are organised
into groups as it is intented as a service for multiple applications to use at
the same time - this organisation allows separation of feature flags that are
intended for different audiences.
Nature\Bandiera\Client::isEnabled
also takes an optional params
array, this is
for use with some of the more advanced features in Bandiera - user group and percentage based flags. It is in this params array you pass in your
user_group
and user_id
, i.e.:
For more information on these advanced features, please see the Bandiera wiki:
https://github.com/springernature/bandiera/wiki/How-Feature-Flags-Work#feature-flags-in-bandiera
Direct API Access
If you'd prefer not to use the isEnabled
method for featching feature flag values, the following methods are available...
Get features for all groups:
Get features for a group:
Get an individual feature:
Development
- Fork this repo.
- Run
composer install
License
© 2014 Springer Nature. Bandiera PHP Client is licensed under the MIT License.