PHP code example of cmuench / lib.notify

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

    

cmuench / lib.notify example snippets




CMuench\LibNotify;
use \CMuench\LibNotify\Adapter\DbusModuleAdapter; // dbus adapter if used

$client = new LibNotify\Client();
// $client = new LibNotify\Client(new DbusModuleAdapter());  // use php dbus module

$client->send(
    'Summary',
    'Body text',
    LibNotify\Urgency\Level::CRITICAL(),
    LibNotify\Icon\Library\Gnome\Status::DIALOG_WARNING
);