Node.js style EventEmitter class for PHP