Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dvnc0/buoy

Small PHP feature flag manager
https://github.com/dvnc0/buoy

Last synced: 15 days ago
JSON representation

Small PHP feature flag manager

Awesome Lists containing this project

README

        

# Buoy

A small PHP Feature Flag library.

`composer require dvnc0/buoy`

## Usage

```php
use Buoy;

Buoy::init();

Buoy::register('feature', function() {
return true;
});

Buoy::can()->access('feature'); // true
```

This also includes a probability function:

```php
Buoy::lotto(50); // true 50% of the time
```

### Feature Validators
The register method can take a callable or a class that implements the `Buoy\Feature_Validator` interface.