2017 © Pedro Peláez
 

library growl

Growl notifications with PHP.

image

bcrowe/growl

Growl notifications with PHP.

  • Saturday, March 12, 2016
  • by bcrowe
  • Repository
  • 2 Watchers
  • 14 Stars
  • 231 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

Growl Notifications with PHP

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

This package aims to provide an easy and fluent interface to construct and execute commands for various desktop notification programs., (*2)

Requirements

PHP 5.4+ and one of the following notification programs:, (*3)

OS X

Growl & GrowlNotify

terminal-notifier

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

Linux

notify-send

``` bash $ apt-get install libnotify-bin $ yum install libnotify, (*4)


### Windows #### Growl & GrowlNotify * [Growl](http://www.growlforwindows.com/gfw/default.aspx) * [GrowlNotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) ## Installation ### Composer ``` bash $ 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:, (*5)


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():, (*6)

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., (*7)

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., (*8)

Available option keys:, (*9)

  • 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., (*10)

Available option keys:, (*11)

  • 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., (*12)

Available option keys:, (*13)

  • 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., (*14)

Testing

bash $ composer test, (*15)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*16)

Security

If you discover any security related issues, please email bryan@bryan-crowe.com instead of using the issue tracker., (*17)

Credits

License

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

The Versions

12/03 2016

dev-master

9999999-dev https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

12/03 2016

2.0.3

2.0.3.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

20/10 2015

2.0.2

2.0.2.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

11/09 2015

dev-develop

dev-develop https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

11/09 2015

2.0.1

2.0.1.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

30/03 2015

dev-snarl

dev-snarl https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

22/03 2015

2.0.0

2.0.0.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

20/03 2015

2.0.0-alpha1

2.0.0.0-alpha1 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

php notifications growl

14/02 2015

1.2.0

1.2.0.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php notifications growl

14/02 2015

1.1.0

1.1.0.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php notifications growl

03/02 2015

1.0.0

1.0.0.0 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php notifications growl

30/01 2015

1.0.0-beta1

1.0.0.0-beta1 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php notifications growl

06/01 2015

1.0.0-alpha2

1.0.0.0-alpha2 https://github.com/bcrowe/growl

Growl notifications with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

php notifications growl

01/12 2014

1.0.0-alpha1

1.0.0.0-alpha1 https://github.com/bcrowe/growl

Cross-platform growl notifications via PHP with a Monolog handler.

  Sources   Download

MIT

The Requires

 

php monolog handler notifications growl

14/11 2014

0.0.5

0.0.5.0 https://github.com/bcrowe/growl

Cross-platform growl notifications via PHP with a Monolog handler.

  Sources   Download

MIT

The Requires

 

php monolog handler notifications growl

25/10 2014

0.0.4

0.0.4.0 https://github.com/bcrowe/growl

Cross-platform growl notifications via PHP with a Monolog handler.

  Sources   Download

MIT

The Requires

 

php monolog handler notifications growl

16/10 2014

0.0.3

0.0.3.0 https://github.com/bcrowe/growl

Cross-platform growl notifications via PHP with a Monolog handler.

  Sources   Download

MIT

The Requires

 

php monolog handler notifications growl

16/09 2014

0.0.2

0.0.2.0 https://github.com/bcrowe/growl

A short description of what your package does

  Sources   Download

MIT

The Requires

 

php notifications growl