phputil/flags-webhooks

Webhooks for the phputil/flags framework

v0.1.2 2024-11-09 21:34 UTC

This package is auto-updated.

Last update: 2024-12-09 21:45:55 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