💻 Send notifications to your desktop directly from your PHP script
PHP Makefile
Clone or download
lyrixx feature #55 Add support for Windows Subsystem for Linux (pyrech, lyrixx)
This PR was merged into the 2.0.x-dev branch.

Discussion
----------

Add support for Windows Subsystem for Linux

Fix #48

Commits
-------

59042a5 Fixed CS
0411dde Add support for Windows Subsystem for Linux
Latest commit e752cee Jul 16, 2018

README.md

JoliNotif

Latest Stable Version Total Downloads Latest Unstable Version Build Status SensioLabsInsight

PHP >= 7.0 (support for PHP 5.4+ was available in version 1.x)

JoliNotif is a PHP library to send notifications to your desktop directly from your script. It takes care of using the right binary available, without having to worry if you're running on Linux, Windows or MacOS.

Demo

For example, if you have a long running PHP task - like executing a large test suite, launching a deployment script - you can use JoliNotif to inform your users that a task just finished.

Installation

Use Composer to install JoliNotif in your project:

composer require "jolicode/jolinotif"

Usage

Use the NotifierFactory to create a Notifier according to which notifiers are available on your system, then use it to send your notification:

include __DIR__.'/vendor/autoload.php';

use Joli\JoliNotif\Notification;
use Joli\JoliNotif\NotifierFactory;

// Create a Notifier
$notifier = NotifierFactory::create();

// Create your notification
$notification =
    (new Notification())
    ->setTitle('Notification title')
    ->setBody('This is the body of your notification')
    ->setIcon(__DIR__.'/path/to/your/icon.png')
    ->addOption('subtitle', 'This is a subtitle') // Only works on macOS (AppleScriptNotifier)
    ->addOption('sound', 'Frog') // Only works on macOS (AppleScriptNotifier)
;

// Send it
$notifier->send($notification);

Further documentation

Discover more by reading the docs:

You can see the current and past versions using one of the following:

And finally some meta documentation:

Credits

License

JoliNotif is licensed under the MIT License - see the LICENSE file for details.