PHPackages                             nekoo/eventemitter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nekoo/eventemitter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nekoo/eventemitter
==================

Port of NodeJSs EventEmitter to PHP 5.4 using traits

v1.1.0(5y ago)151032[1 PRs](https://github.com/christopherobin/EventEmitter/pulls)MITPHPPHP &gt;=5.4.0

Since Apr 5Pushed 5y ago5 watchersCompare

[ Source](https://github.com/christopherobin/EventEmitter)[ Packagist](https://packagist.org/packages/nekoo/eventemitter)[ Docs](https://github.com/christopherobin/EventEmitter)[ RSS](/packages/nekoo-eventemitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

EventEmitter
============

[](#eventemitter)

This is a direct port of the [*EventEmitter*](https://github.com/joyent/node/blob/master/lib/events.js) class from [node.js](https://github.com/joyent/node/) using PHP 5.4 traits.

Why PHP 5.4?
------------

[](#why-php-54)

Due to the nature of the *EventEmitter* functionnality, using simple extends sounds like the wrong way to deal with it as it is a set of functionnality to add to an existing class instead of your class extending the functionnalities of EventEmitter. As such traits are the best way to implement this kind of functionnality and those are only available to PHP 5.4+.

How to Use
----------

[](#how-to-use)

```
