monotify/monotify

Send notification to files, email, databases, various alert services

dev-master / 0.1.x-dev 2016-12-18 09:24 UTC

This package is auto-updated.

Last update: 2024-10-13 02:48:34 UTC


README

Send notification to files, email, databases, various alert services

<?php

use Monotify\Handler\SlackHandler;
use Monotify\Handler\HipchatHandler;
use Monotify\Notification\Notification;
use Monotify\Notifier;

require 'vendor/autoload.php';

$notifier = new Notifier('realtime-notifier');
$notifier->addHandler(new SlackHandler(
    'yourhookurl',
    'channel' // without the #
));
$notifier->addHandler(new HipchatHandler(
    'yourtoken',
    'room' // string or id
));
$notifier->notify((new Notification('this is a realtime notification')));