phputil/flags-webhooks

Webhooks for the phputil/flags framework

v0.1.1 2024-06-02 00:07 UTC

This package is auto-updated.

Last update: 2024-11-02 01:07:39 UTC


README

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