• Stars
    star
    1,239
  • Rank 37,913 (Top 0.8 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 13 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Événement

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

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

It is very strongly inspired by the EventEmitter API found in node.js.

Continuous Integration Latest Stable Version Total Downloads License

Fetch

The recommended way to install Événement is through composer. By running the following command:

$ composer require evenement/evenement

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->removeListener('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.

More Repositories

1

retry

A tiny library for retrying failing operations.
PHP
542
star
2

get-in

Functions for for hash map (assoc array) traversal.
PHP
370
star
3

ConfigServiceProvider

A config ServiceProvider for Silex with support for php, json and yaml.
PHP
216
star
4

yolo

The microframework with swag.
PHP
201
star
5

IgorwFileServeBundle

Symfony2 Bundle for serving protected files.
PHP
167
star
6

doucheswag

Swag for douchebags.
PHP
135
star
7

EventSource

A PHP 5.3 library for creating an EventSource stream.
PHP
106
star
8

naegleria

A brainfuck compiler written in PHP. Also, a brain-eating amoeba.
PHP
89
star
9

compose

Function composition.
PHP
84
star
10

reasoned-php

A miniKanren in PHP.
Hack
74
star
11

trashbin

simple pastebin written in PHP
PHP
72
star
12

galapagos

Evolutionary language transformation.
PHP
72
star
13

CgiHttpKernel

Adapter from HttpKernelInterface to CGI.
PHP
60
star
14

composer-yaml

Tool to convert from composer.yml to composer.json.
PHP
58
star
15

silex-examples

Examples of Silex apps.
PHP
58
star
16

smaug

Here be dragons.
PHP
44
star
17

edn

Extensible Data Notation Parser.
PHP
42
star
18

stack-oauth

OAuth stack middleware.
PHP
38
star
19

turing-php

Turing machine emulator in PHP.
PHP
30
star
20

balrog

The tiny static site generator written in lisphp.
PHP
29
star
21

lambda-php

Lambda calculus interpreter in PHP.
PHP
22
star
22

ilias

Naive LISP implementation in PHP.
PHP
22
star
23

SocketServer

Stream-powered library for creating a socket server in PHP.
PHP
21
star
24

fab-symfony-console

Make symfony console output FABULOUS!
PHP
21
star
25

chicken-php

Chicken VM written in PHP.
PHP
21
star
26

whitespace-php

It's the little machine that you cannot see!
PHP
19
star
27

middleware

Demo of HttpKernel middlewares.
PHP
18
star
28

conway-php

Conway's Game of Life in PHP.
PHP
18
star
29

phpunit-phar

package phpunit as a standalone phar file.
PHP
17
star
30

webserver-zceu

PHP
17
star
31

websockets-talk

Samples from the WebSockets talk.
JavaScript
17
star
32

dev-zero

/dev/zero emulator, provides a large supply of zeroes.
PHP
12
star
33

FcgiHttpKernel

Adapter from HttpKernelInterface to FastCGI.
PHP
12
star
34

brainfuck-php

Brainfuck implementation.
PHP
8
star
35

dnsresolv

Foobar DnsResolv, based on Silex.
PHP
8
star
36

befunge-php

Befunge-98 implementation.
PHP
7
star
37

cute-little-interpreters

ROBOTS! IN YOUR COMPUTER!
PHP
7
star
38

clusterstream

A stream of the universe.
PHP
6
star
39

weblog

Weblog on igor.io.
CSS
5
star
40

matelight-blm

Bring back the old Blinkenlights to Mate Light.
PHP
5
star
41

rpn

Calculator.
PHP
4
star
42

wsm

Whitespace Assembly Language
PHP
4
star
43

composer-version-invalidation

A test project for composer version invalidation.
4
star
44

lusp

A lil' Lisp.
PHP
4
star
45

realtime-examples

Examples of real-time apps using websockets and eventstream.
PHP
4
star
46

webpaper

paper on the web
JavaScript
4
star
47

git-search

Index a number of git repositories into elasticsearch, view via web interface.
PHP
3
star
48

modcasts

phpbb modding screencasts
PHP
3
star
49

silencium

Multiplayer kick-ass taboo
Ruby
3
star
50

pip-phar

Compiles pip into a phar archive that can serve Silex apps.
PHP
3
star
51

playground

Shell
2
star
52

phpbb

Popular open-source bulletin board written in PHP
PHP
2
star
53

whyyy.computer

2
star
54

notponies

idea collection system based on phpBB
PHP
2
star
55

NelmioHelloBundle

PHP
2
star
56

polysolv

Recursive implementation of Newton's method for finding polynomial roots.
Java
2
star
57

craplog

This is one of the crappiest blogs you will ever find.
PHP
2
star
58

webserver-talk

PHP
2
star
59

ascraeus-foobar-extension

Foobar extension for the upcoming phpBB 3.1.
PHP
2
star
60

phpbb-github_profile_link

A phpBB 3.0 modification to let users specify their GitHub profile.
PHP
2
star
61

nbsp

2
star
62

septopus

Septopus is a sucky vocab trainer written in java.
Java
1
star
63

automata-php

Kleine automaten.
PHP
1
star
64

dotfiles

geeky unix shell config.
Vim Script
1
star
65

slave

automated phpBB installation, that's right.
PHP
1
star
66

createjs-presence-server

Sample implementation of a presence server for createjs.
1
star
67

bitserv

git-based wiki built on sinatra
Ruby
1
star
68

clj-polysolv

Recursive implementation of Newton's method for finding polynomial roots.
Clojure
1
star
69

ultragraph

Java application to simulate basic graph theory algorithms.
Java
1
star
70

bitserv-example

example wiki repo for bitserv
1
star
71

bertiebot

A ruby implementation of BertieBot.
Ruby
1
star
72

genders

phpBB Genders MOD
PHP
1
star
73

buster-docs

Ruby
1
star