Commit 8d09633b by Carsten Brandt

allow class level trigger call on Event subclasses

e.g. UserEvent::trigger('event', 'class'); should result in a UserEvent to be passed to the handlers instead of a base\Event.
parent 4bb2ee95
......@@ -157,7 +157,7 @@ class Event extends Object
return;
}
if ($event === null) {
$event = new self;
$event = new static;
}
$event->handled = false;
$event->name = $name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment