2017 © Pedro Peláez
 

library gossip

Lightweight event broadcasting library for PHP 5.4+

image

selvinortiz/gossip

Lightweight event broadcasting library for PHP 5.4+

  • Thursday, June 23, 2016
  • by selvinortiz
  • Repository
  • 1 Watchers
  • 10 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Gossip, (*1)

Build Status Total Downloads Latest Stable Version, (*2)

Description

Gossip is a tiny event broadcasting library written by Selvin Ortiz, (*3)

Requirements

Install

composer require selvinortiz/gossip

Test

sh spec.sh

Usage

Event broadcasting is a fancy way of saying that Gossip allows you to register your responders to listen for a specific event and when that event is whispered, it can respond., (*4)


use SelvinOrtiz\Gossip\Gossip; class App { public function init() { Gossip::instance()->whisper(new Event('app.init')); } public function end() { Gossip::instance()->whisper(new Event('app.end', [$this])); } public function log($message) { // Log a $message to db or file system } } // Called when app.init is whisper()ed Gossip::instance()->listen('app.init', function (Event &$event) { // Bootstrap third party code, initialize services, etc. }); // Called only the first time app.end is whisper()ed Gossip::instance()->listenOnce('app.end', function (Event &$event, $app) { // Close db connections, destroy sessions, etc. $app->log('Application is ending...'); });

API

API reference is coming soon..., (*5)

Contribute

Gossip wants to be friendly to first time contributors. Just follow the steps below and if you have questions along the way, please reach out., (*6)

  1. Fork it!
  2. Create your bugfix or feature branch
  3. Commit and push your changes
  4. Submit a pull request

License

Gossip is open source software licensed under the MIT License, (*7)

The Versions

23/06 2016

dev-master

9999999-dev https://github.com/selvinortiz/zit

Lightweight event broadcasting library for PHP 5.4+

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

events notifications gossip

23/06 2016

dev-dev

dev-dev https://github.com/selvinortiz/zit

Lightweight event broadcasting library for PHP 5.4+

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

events notifications gossip

23/06 2016

v1.0.0

1.0.0.0 https://github.com/selvinortiz/zit

Lightweight event broadcasting library for PHP 5.4+

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

events notifications gossip

21/02 2015

v0.2.0

0.2.0.0 https://github.com/selvinortiz/zit

Event notification system for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

events notifications gossip