Example #1
0
 /**
  * @param string $summary
  * @param string $body
  * @param Level $urgency default "normal"
  * @param string $iconPath
  * @param string $category
  * @param string $appName
  */
 public function send($body, $summary = '', $urgency = '', $iconPath = '', $category = '', $appName = '')
 {
     if (!$urgency) {
         $urgency = Level::NORMAL();
     }
     $this->adapter->setSummary($summary)->setBody($body)->setAppName($appName)->setCategory($category)->setUrgency($urgency)->setIcon($iconPath)->send();
 }
Example #2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use CMuench\LibNotify;
use CMuench\LibNotify\Adapter\DbusModuleAdapter;
$client = new LibNotify\Client(new DbusModuleAdapter());
$client->send('test: ' . time(), 'body', LibNotify\Urgency\Level::CRITICAL(), LibNotify\Icon\Library\Gnome\Status::DIALOG_WARNING);