Download the PHP package vehikl/flip without Composer
On this page you can find all versions of the php package vehikl/flip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package flip
Short Description A Feature Toggle implementation
License MIT
Homepage https://github.com/vehikl/flip
Informations about the package flip
Flip
Flip is a simple Feature Toggle implementation. Features are implemented as independent classes and are "mixed" into the class you want the feature to be exposed from.
Install
Via Composer
Usage
A Flip feature is just a regular PHP class with a few required methods.
enabled
- This method returns a boolean value indicating if the feature is enabled or not
toggles
- This method returns an array of available feature toggles. The array is keyed by the name of the method which
is called to run the feature. The value of each key is an associative array with keys on
and off
, each key
is mapped to the appropriate method to call depending on if the feature is "on" or "off".
Forcing Features to be On or Off
You can force a feature to be "on" or "off" by calling the alwaysOn
or alwaysOff
static methods respectively. This
will force all features of that class to be either "on" or "off" regardless of how their enabled
methods evaluate.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Colin DeCarlo
- Brad Brothers
- All Contributors
License
The MIT License (MIT). Please see License File for more information.