Skip to content

thiagodp/phputil-flags-webhooks

Repository files navigation

phputil/flags-webhooks

Version Build License PHP

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

License

MIT © Thiago Delgado Pinto

About

🌍 Webhooks for the phputil/flags framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages