PHPackages                             mehr-als-nix/notifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mehr-als-nix/notifier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mehr-als-nix/notifier
=====================

Desktop Notifier Library.

v1.0.0(10y ago)3621MITPHPPHP &gt;=5.3

Since Aug 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/MehrAlsNix/Notifier)[ Packagist](https://packagist.org/packages/mehr-als-nix/notifier)[ Docs](http://mehralsnix.github.io/Notifier)[ RSS](/packages/mehr-als-nix-notifier/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (9)Used By (1)

Notifier
========

[](#notifier)

[![Build Status](https://camo.githubusercontent.com/bc058fc446ebe81f4a53d1599e4bc76723b78d1d12fefc04e290055422a0e935/68747470733a2f2f7472617669732d63692e6f72672f4d656872416c734e69782f4e6f7469666965722e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/MehrAlsNix/Notifier) [![Code Climate](https://camo.githubusercontent.com/e89ada1be335929e7c2322cc45e88dae07cbb66f689ab5011da8a850eabe1bcf/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4d656872416c734e69782f4e6f7469666965722f6261646765732f6770612e737667)](https://codeclimate.com/github/MehrAlsNix/Notifier) [![Test Coverage](https://camo.githubusercontent.com/79d5e9d9ac339c8e2a980748a4d0681c666a481c8128703896b66055f919dd95/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4d656872416c734e69782f4e6f7469666965722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/MehrAlsNix/Notifier/coverage) [![Dependency Status](https://camo.githubusercontent.com/91b5cac3447c56946ad54e4357ffd477607a5fb377c5a78f0a560a976c3b039c/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535633736626330363533373632303031613030333737302f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/55c76bc0653762001a003770) [![HHVM Status](https://camo.githubusercontent.com/cc9d36de9e86697dea1124eca3ce84ac2b41badf4a255c35c448f76f421e4b9d/687474703a2f2f6868766d2e683463632e64652f62616467652f6d6568722d616c732d6e69782f6e6f7469666965722e737667)](http://hhvm.h4cc.de/package/mehr-als-nix/notifier)

Desktop Notifications
---------------------

[](#desktop-notifications)

`Notifier` acts as a wrapper for desktop notify applications on different operating systems.

Following notify wrappers are build in and would make checks to chose one of:

- notify-send (Linux)
- terminal-notifier (Mac)
- toast.exe (Windows) [nels-o/toaster](https://github.com/nels-o/toaster)

Install via composer
--------------------

[](#install-via-composer)

Add a dependency on `mehr-als-nix/notifier` to your project's `composer.json` file.

Here is a minimal example of a manually created composer.json file that just defines a dependency on `mehr-als-nix/notifier`

```
{
    "require": {
        "mehr-als-nix/notifier": "~2"
    }
}

```

For PHP environments prior to version 5.6 use instead:

```
{
    "require": {
        "mehr-als-nix/notifier": "~1"
    }
}

```

Usage
-----

[](#usage)

Example:

```
   \MehrAlsNix\Notifier\Notify::getInstance()
       ->sendMessage('Notification', 'This is a desktop message!');

```

Extend
------

[](#extend)

Custom class has to extend from `\MehrAlsNix\Notifier\Notification`

```
