PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

allow callable as Event::register objects #224

Closed Schlaefer closed 9 years ago

Schlaefer commented 9 years ago

Extends the Event::register to also accept callables:

Event::registerEvent('before_foo', function($data) { … } );
// or
Event::registerEvent('before_foo', [$myClassInstance, 'method']);
Schlaefer commented 9 years ago

merged in e9478af6582e075bc531e02130b0162256d5bb80