PHP code example of phil / broken-flow-alerts

1. Go to this page and download the library: Download phil/broken-flow-alerts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phil / broken-flow-alerts example snippets


use Phil\BrokenFlowAlerts\{BrokenFlowWatch, Flow};
use Phil\BrokenFlowAlerts\Notifier\NotifierAlertSender;

$watch = new BrokenFlowWatch($history, new NotifierAlertSender($notifier), $clock);

// Once a day: the alerts of the flows that broke or recovered on the last whole UTC day
$alerts = $watch->check([Flow::of('checkout', 'Ticket sales'), Flow::of('contact', 'Contact form')]);