Download the PHP package fetzi/flipt-php without Composer
On this page you can find all versions of the php package fetzi/flipt-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fetzi/flipt-php
More information about fetzi/flipt-php
Files in fetzi/flipt-php
Package flipt-php
Short Description A PHP package for integrating the Flipt REST API
License MIT
Informations about the package flipt-php
flipt-php is a small wrapper package for the Flipt REST API to be able to easily integrate Flipt into your PHP applications.
Installation
Usage
The Flipt
class uses HTTPlug a HTTP Client abstraction to make the API requests. You have to pass a base URL to the static create
function. Everything else (HttpClient
, RequestFactory
& StreamFactory
) is automatically determined.
By calling the evaluate
method you can check if a certain user (entity) should get a certain feature or not. To perform a evaluation you need to create a EvaluateRequest
that contains the data to evaluate.
Variants
To be able to determine which variant of a feature-flag should be displayed you need to use the getVariant()
method on the response.
The EvaluateResponse
also provides a variant that can be accessed via the getValue()
or getVariant()
method:
flipt-php was created by Johannes Pichler under the MIT license.
All versions of flipt-php with dependencies
psr/http-client-implementation Version ^1.0
psr/http-message Version ^1.0
psr/http-factory Version ^1.0
php-http/httplug Version ^2.2
php-http/discovery Version ^1.13