定制 cmuench/lib.notify 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-27