Skip to content
/ event Public
forked from igorw/evenement

Simple event dispatching library for PHP.

License

Notifications You must be signed in to change notification settings

arkphp/event

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Build Status

Simple event dispatching library for PHP.

This library is a fork from igorw/evenement.

Installation

composer require ark/event

Usage

Creating an Emitter

<?php
$emitter = new Ark\Event\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));

About

Simple event dispatching library for PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%