Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filp/nod
Notifications in PHP (notify-send, growl, etc) like that.
https://github.com/filp/nod
Last synced: about 1 month ago
JSON representation
Notifications in PHP (notify-send, growl, etc) like that.
- Host: GitHub
- URL: https://github.com/filp/nod
- Owner: filp
- Created: 2012-08-28T19:50:47.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-29T13:20:25.000Z (almost 12 years ago)
- Last Synced: 2024-05-09T09:13:40.434Z (about 1 month ago)
- Language: PHP
- Size: 105 KB
- Stars: 52
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Lists
- awesome-php - Nod - A notification library (e.g., Growl). (Notifications)
- awesome-php-cn - 官网
- awesome-php - Nod - 一个通知库 (URL)
- awesome-php - Nod - A notification library (e.g., Growl). (Notifications)
- awesome-php - Nod - 一个通知库 (通知( Notifications ))
- awesome-php-cn - 官网
- awesome-php - filp/nod - 一个通知库 (通知( Notifications ))
README
#Nod
========
Notifications in PHP (`notify-send, growl, etc`) like **that**.##Examples
============Letting `Nod` figure out the best Adapter to use (**not recommend ATM, only works with some Linux environments**):
```php
#!/usr/bin/env php
setTitle('My rad notification')
->setMessage('Check it.')
->setUrgency('high')
->setExpiry(3000)
->setIcon('emblem-favorite.png')
->send();
```Explicitly giving **Nod** an Adapter to work with:
```php
#!/usr/bin/env php
setTitle('Look at ya')
->setMessage('Let me see what ya got')
// you can also specify the expiry directly in the send() method:
->send(5000);
```Creating your own Adapters is also as easy as implementing `Nod\Adapter\AdapterInterface`:
```php