Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dvnc0/buoy
- Owner: dvnc0
- Created: 2024-10-22T04:57:11.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-10-22T05:18:08.000Z (3 months ago)
- Last Synced: 2024-11-22T07:09:48.490Z (about 1 month ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.