phputil / flags-webhooks
Webhooks for the phputil/flags framework
v0.1.1
2024-06-02 00:07 UTC
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- captainhook/captainhook: ^5.18
- friendsofphp/php-cs-fixer: ^3.56
- kahlan/kahlan: ^5.2
- phpstan/phpstan: ^1.10
- phputil/flags: ^0.4.1
- phputil/kahlan: ^0.3.0
- phputil/restage: ^0.3.0
README
Web hooks for the phputil/flags framework.
Installation
PHP 7.4 or later. It uses Guzzle for making HTTP requests.
composer require phputil/flags-webhooks
Usage
require_once 'vendor/autoload.php'; use \phputil\flags\webhooks\WebhookListener; $listener = new WebhookListener( 'https://example.com' ); // Now let's use it with the framework $flags = new \phputil\flags\FlagManager(); $flags->getListeners()->add( $listener ); // Notifying $flags->enable( 'foo' ); // POST request (creation) $flags->disable( 'foo' ); // PUT request (update) $flags->remove( 'foo' ); // DELETE request (removal)
Documentation
Soon