kzykhys / Ciconia

A New Markdown parser for PHP5.4
http://ciconia.kzykhys.com/
MIT License
355 stars 31 forks source link

Using sabre/event for event management #20

Closed evert closed 10 years ago

evert commented 10 years ago

Hi!

The attached pull request migrates from using an internal event management system to using sabre/event. It has a bit more options, but still has the same feature set; and the method signatures are nearly identical.

The main differences are:

I hope you like it. I realize this is a selfish PR as I'd like to see my library used more. I would be willing to add EmitterAwareInterface and EmitterAwareTrait to sabre/event, if that helps convincing you :)

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 0d8adb4a33e594d4db2ed62020f9ee3632438f8a on evert:sabre-event into 4914389b6ff46b13c324a48aa5080eb241a62ec2 on kzykhys:master.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-6.44%) when pulling a205a4281ae7cf5f190859beac9b46f0f1b269ec on evert:sabre-event into 4914389b6ff46b13c324a48aa5080eb241a62ec2 on kzykhys:master.

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.08%) when pulling ca904a2126a48de603ce4350f56f4947fee2cb09 on evert:sabre-event into 4914389b6ff46b13c324a48aa5080eb241a62ec2 on kzykhys:master.

kzykhys commented 10 years ago

It is a big change for me. Specifically, my (non open sourced) extensions won't work without any modification. But I appreciate your work. Let me think about it.

evert commented 10 years ago

The changes I had to make were not very difficult. I understand and won't be offended if you don't want the patch, but if I can help with anything, let me know :)

kzykhys commented 10 years ago

@evert Thank you very much! I close this issue.

I'd like these features. that's why i couldn't make a decision.

  • If a callback returns false the event chain is stopped immediately.
  • $eventEmitter->once('event', $callback)