2017 © Pedro Pel√°ez
 

library evenement

√Čv√©nement is a very simple event dispatching library for PHP

image

evenement/evenement

√Čv√©nement is a very simple event dispatching library for PHP

  • Tuesday, May 15, 2018
  • by WyriHaximus
  • Repository
  • 35 Watchers
  • 722 Stars
  • 6,404,968 Installations
  • PHP
  • 191 Dependents
  • 2 Suggesters
  • 56 Forks
  • 3 Open issues
  • 11 Versions
  • 8 % 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": "^3.0 || ^2.0"
    }
}

Note: The 3.x version of √Čv√©nement requires PHP 7 and the 2.x version requires PHP 5.4. If you are using PHP 5.3, please use the 1.x 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()));
});

Removing Listeners

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

Emitting Events

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

Tests

$ ./vendor/bin/phpunit

License

MIT, see LICENSE., (*10)

The Versions

15/05 2018

dev-master

9999999-dev

√Čv√©nement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

event-dispatcher event-emitter

23/07 2017

v3.0.1

3.0.1.0

√Čv√©nement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

event-dispatcher event-emitter

23/07 2017

3.0.0

3.0.0.0

√Čv√©nement is a very simple event dispatching library for PHP

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

event-dispatcher event-emitter

17/07 2017

2.0.x-dev

2.0.9999999.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

17/07 2017

v2.1.0

2.1.0.0

√Č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

17/07 2017

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

17/07 2017

v1.1.0

1.1.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

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