All Projects → bcrowe → growl

bcrowe / growl

Licence: MIT license
🐯 Growl Notifications with PHP

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to growl

Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+43971.43%)
Mutual labels:  notifications, growl
ngx-toasta
Simple and clean Toast notification library for AngularX (Angular2 and beyond)
Stars: ✭ 20 (+42.86%)
Mutual labels:  notifications, growl
webpush-example
A basic push notifications app built on Laravel and Vanilla Javascript.
Stars: ✭ 26 (+85.71%)
Mutual labels:  notifications
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (+150%)
Mutual labels:  notifications
react-native-open-notification
www.npmjs.com/package/react-native-open-notification
Stars: ✭ 23 (+64.29%)
Mutual labels:  notifications
vue-over-body
Create modals, sidebars, notifications, pop ups with css transitions!
Stars: ✭ 38 (+171.43%)
Mutual labels:  notifications
homely
🏠 - A bunch of mosquittos. IoT wiring and notification framework, with an unix style.
Stars: ✭ 15 (+7.14%)
Mutual labels:  notifications
EasyBuzzer
The Beep Library For Arduino
Stars: ✭ 63 (+350%)
Mutual labels:  notifications
php-onesignal-sdk
PHP SDK for OneSignal RESTful API
Stars: ✭ 19 (+35.71%)
Mutual labels:  notifications
cloud-build-notifiers
Notifier images for Cloud Build, complete with build status filtering and Google Secret Manager integration
Stars: ✭ 79 (+464.29%)
Mutual labels:  notifications
fluffychat
+++++Moved to GitLab+++++
Stars: ✭ 47 (+235.71%)
Mutual labels:  notifications
csgo-rcon-nodejs
A web panel to control a CS:GO server
Stars: ✭ 46 (+228.57%)
Mutual labels:  notifications
ember-cli-new-version
A convention based update notification for Ember. With this addon, you can detect a new version and notify the user to refresh the page
Stars: ✭ 22 (+57.14%)
Mutual labels:  notifications
Graphical notifications Zabbix
No description or website provided.
Stars: ✭ 77 (+450%)
Mutual labels:  notifications
swift-sdk
Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
Stars: ✭ 65 (+364.29%)
Mutual labels:  notifications
PushMeBaby
iOS Push Notification Debug App. You can use this app during iOS Push Notification (development or production) to push notifications on your device from your Mac.
Stars: ✭ 47 (+235.71%)
Mutual labels:  notifications
stack-exchange-notifications
Add-ons for Stack Exchange sites, like: askdifferent, askubuntu, serverfault, stackoverflow and superuser
Stars: ✭ 21 (+50%)
Mutual labels:  notifications
Dracker
An iOS and React App to track debt and send/receive payments.
Stars: ✭ 22 (+57.14%)
Mutual labels:  notifications
corpwechatbot
企业微信的python封装接口,简易上手,开箱即用,一行代码实现消息推送。A more convenient python wrapper interface of corpwechat(wework, wecom) official API, use only one line of code to send your messages to your corpwechat(wework, wecom) .
Stars: ✭ 119 (+750%)
Mutual labels:  notifications
content-reminder
⏰ A GitHub Action that reminds you to share your own content
Stars: ✭ 28 (+100%)
Mutual labels:  notifications

Growl Notifications with PHP

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This package aims to provide an easy and fluent interface to construct and execute commands for various desktop notification programs.

Requirements

PHP 5.4+ and one of the following notification programs:

OS X

Growl & GrowlNotify

terminal-notifier

$ gem install terminal-notifier
$ brew install terminal-notifier

Linux

notify-send

$ apt-get install libnotify-bin
$ yum install libnotify

Windows

Growl & GrowlNotify

Installation

Composer

$ composer require bcrowe/growl

Usage

Create a new instance of the Growl class. You can optionally supply a Builder class and its path if you don't wish for the package to choose a notification program based on your system:

<?php
use BryanCrowe\Growl\Growl;

$Growl = new Growl;

// Or...

use BryanCrowe\Growl\Growl;
use BryanCrowe\Growl\Builder\GrowlNotifyBuilder;

$Growl = new Growl(new GrowlNotifyBuilder('/usr/local/bin/growlnotify'));
?>

Now, you can set key/value options for a Builder to use with the setOption() or setOptions() methods. After setting options, the last thing to do is build the command with buildCommand() or run it with execute():

<?php
(new Growl)
    ->setOption('title', 'Hello World')
    ->setOption('message', 'How are you doing?')
    ->setOption('sticky', true)
    ->execute();

// Or...

$Growl = new Growl;
$Growl->setOptions([
        'title' => 'Hello World',
        'message' => 'How are you doing?',
        'sticky' => true
    ])
    ->buildCommand();

exec($Growl);
?>

By default, this package will escape all command arguments that are supplied as options. If you want to change this, there are two options. Either completely disable escaping, or provide a safe-list of option keys that will be bypassed while escaping is enabled.

<?php
// Completely disable escaping...
(new Growl)
    ->setOptions([
        'title' => 'Hello World',
        'message' => 'How are you doing?',
        'url' => 'http://www.google.com'
    ])
    ->setEscape(false)
    ->execute();

// Set a safe-list of option keys. Can be an array of option keys, or a string.
(new Growl)
    ->setOptions([
        'title' => 'Hello World',
        'message' => $mySafeMessage,
        'url' => $mySafeURL
    ])
    ->setSafe(['message', 'url'])
    ->execute();
?>

Builders

GrowlNotifyBuilder & GrowlNotifyWindowsBuilder

Builds commands for growlnotify.

Available option keys:

  • title string The title of the growl.
  • message string The growl's body.
  • sticky boolean Whether or not make the growl stick until closed.
  • image string A name of an application's icon to use, e.g., "Mail" (OS X only), the path to a file on the system (OS X & Windows), or a URL to an image (Windows only).
  • url string A URL to open if the growl is clicked.

TerminalNotifierBuilder

Builds commands for terminal-notifier.

Available option keys:

  • title string The title of the notification.
  • subtitle string The notification's subtitle.
  • message string The notification's body.
  • image string A URL to an image to be used as the icon. (OS X Mavericks+ only)
  • contentImage string A URL to an image to be in the notification body. (OS X Mavericks+ only)
  • url string A URL to go to when the notification is clicked.

NotifySendBuilder

Builds commands for notify-send.

Available option keys:

  • title string The title of the notification.
  • message string The notification's body.
  • sticky boolean Whether or not make the notification stick until closed.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].