dev-master
9999999-dev http://github.com/roccozanni/growlerGrowl binding for PHP
MIT
The Requires
- php >=5.3.0
by Rocco Zanni
notifications growl gntp
Wallogit.com
2017 © Pedro Peláez
Growl binding for PHP
If you have installed the package with composer, it will provide autoloading feature:, (*2)
require_once 'vendor/.composer/autoload.php';
Otherwise, if you already use in your project a PSR-0 compliant autoloader, simply register the "Growler" namespace:, (*3)
// This is based on the Symfony2 Class Loader
$loader->registerNamespace('Growler', 'growler/src');
Otherwise, a basic autoloader is included in the Growler distribution:, (*4)
require_once 'growler/src/Growler/ClassLoader.php'; Growler\ClassLoader::register();
Historical versions of Growl (< 1.3), listen to the UDP port 9887 for incoming messages that represents notifications to display, (*5)
The protocol is very simple:, (*6)
The UDP procol implementation is feature-complete., (*7)
This is an example for creating a UDP based transport:, (*8)
$connection = new Growler\Connection("udp", "localhost", 9887);
$transport = new Growler\Transport\Udp($connection);
From Growl 1.3 has been introduced the new TCP-based GNTP protocol., (*9)
GNTP is a protocol to allow two-way communication between applications and centralized notification systems such as Growl for Mac OS X and to allow two-way communication between two machines running centralized notification systems for notification forwarding purposes., (*10)
Missing GNTP features:, (*11)
This is an example for creating a GNTP based transport:, (*12)
$connection = new Growler\Connection("tcp", "localhost", 23053);
$transport = new Growler\Transport\Gntp($connection);
Either the UDP and the GNTP protocols, support server password. Just add the password as the second parameter in transport creation:, (*13)
$transport = new Growler\Transport\Gntp($connection, "secret");
Code samples are available in the "examples" directory, (*14)
Growl binding for PHP
MIT
notifications growl gntp