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.

Lists

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