2017 © Pedro Peláez
 

library evenement

Événement is a very simple event dispatching library for PHP

image

gabrielbull/evenement

Événement is a very simple event dispatching library for PHP

  • Wednesday, February 26, 2014
  • by gabrielbull
  • Repository
  • 1 Watchers
  • 1 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 55 Forks
  • 0 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

Événement

Événement is a very simple event dispatching library for PHP., (*1)

It has the same design goals as Silex and Pimple, to empower the user while staying concise and simple., (*2)

It is very strongly inspired by the EventEmitter API found in node.js., (*3)

Build Status, (*4)

Fetch

The recommended way to install Événement is through composer., (*5)

Just create a composer.json file for your project:, (*6)

{
    "require": {
        "evenement/evenement": "2.0.*"
    }
}

Note: The 2.0.* version of Événement requires PHP 5.4. If you are using PHP 5.3, please use the 1.0.* version:, (*7)

{
    "require": {
        "evenement/evenement": "1.0.*"
    }
}

And run these two commands to install it:, (*8)

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install

Now you can add the autoloader, and you will have access to the library:, (*9)

<?php
require 'vendor/autoload.php';

Usage

Creating an Emitter

<?php
$emitter = new Evenement\EventEmitter();

Adding Listeners

<?php
$emitter->on('user.created', function (User $user) use ($logger) {
    $logger->log(sprintf("User '%s' was created.", $user->getLogin()));
});

Emitting Events

<?php
$emitter->emit('user.created', array($user));

Tests

$ phpunit

License

MIT, see LICENSE., (*10)

The Versions

26/02 2014

dev-tmp

dev-tmp

Événement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event-dispatcher event-emitter

26/02 2014

dev-master

9999999-dev

Événement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event-dispatcher event-emitter

29/12 2012

1.0.x-dev

1.0.9999999.9999999-dev

Événement is a very simple event dispatching library for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

event-dispatcher

02/11 2012

v2.0.0

2.0.0.0

Événement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

event-dispatcher event-emitter

30/05 2012

v1.0.0

1.0.0.0

Événement is a very simple event dispatching library for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

event-dispatcher

30/10 2011

0.1.3

0.1.3.0 https://github.com/igorw/evenement

Événement is a very simple event dispatching library for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

event-dispatcher

22/09 2011

0.1.0

0.1.0.0 https://github.com/igorw/Evenement

Événement is a very simple event dispatching library for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

event-dispatcher