>setIcon(_DIR_.'/Resources/icons/success.png') ** \Joli\JoliNotif\Notifier $notifier */Īll you have to do is create your notification then pass it to the Notifier: use Joli\JoliNotif\Notification In order to achieve that, it provides a factory that will return the appropriate notifier: use Joli\JoliNotif\NotifierFactory JoliNotif looks for which notifiers are available on your current system and will use the best one to display your notification.
JoliNotif is a tiny PHP library that allows you to display desktop notifications, whatever the OS you’re running: It’s not that easy to make your notification cross-platform.
Php growl notification windows#
For Windows, there is two applications: Notifu for Windows 7 and Toaster for Windows 8 and higher.Įach of those softwares has its own syntax and options. Most Linux distributions have the package libnotify-bin preinstalled which makes available the executable notify-send. MacOS can provide access to its notification center with either the terminal-notifier binary, via AppleScript or with the growlnotify binary, if Growl is installed. Wouldn’t be cool if you could be notified by your desktop when the task just finished?Įach OS has its owns softwares to display a desktop notification. If your script takes some time to process, you will likely minimize the terminal and forget about it. Even if the language was originally created as a templating engine to generate web page, it’s more and more often used in the console to: We celebrate this year the 20th birthday of PHP.
JoliDay 2015 avec de la sciure, de l’étain et des Lego ⇒ Retour sur le PHP Tour 2015 au Luxembourg