cmuench/lib.notify
最新稳定版本:1.1.1
Composer 安装命令:
composer require cmuench/lib.notify
包简介
Linux desktop notification library
README 文档
README
The library can be extended by adapter. Currently we deliver one default adapter which needs external tool "notify-send".
Installation
composer.phar require "cmuench/lib.notify=dev-master"
External tool installation
Ubuntu
Can be installed via apt (universal package)
sudo apt-get install libnotify-bin
Supported Adapters
- Standard: external libnotify command
- PHP Module DBus (pecl install dbus)
Example-Usage
<?php require_once __DIR__ . '/../vendor/autoload.php'; use \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 );
Icon Library
The icon library was generated by this bash commands:
find /usr/share/icons/gnome/32x32/actions -type f -name "*.png" -exec bash -c 'echo -n "const "; basename {} .png | tr "[:lower:]" "[:upper:]" | tr "-" "_" | tr "\n" "="; echo -n \"{}\"; echo ";" ' \; >> <path_to_php_file>
find /usr/share/icons/Humanity/categories/32 -type f -name "*.svg" -exec bash -c 'echo -n "const "; basename {} .svg | tr "[:lower:]" "[:upper:]" | tr "-" "_" | tr "\n" "="; echo -n \"{}\"; echo ";" ' \; >> <path_to_php_file>
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-27