PHP code example of madalynn / growl

1. Go to this page and download the library: Download madalynn/growl 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/ */

    

madalynn / growl example snippets




$growl = new Madalynn\Growl\Growl('My application');

// Create a new notification type for the application
$notification = new Madalynn\Growl\Notification\Type('Foobar');

$notification->setIcon('http://foobar.com/myicon.png');
$notification->setDisplayName('Foobar notification type');

$growl->addNotificationType($notification);

// Create a new message for this type
$message = $notification->create('Title', 'Message');

$message->setSticky(true);
$message->setPriority(Madalynn\Growl\Notification\Message::PRIORITY_MODERATE);

// Send the message
$growl->sendNotify($message);