Browse Source

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.
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
8d09633bb9
  1. 2
      framework/yii/base/Event.php

2
framework/yii/base/Event.php

@ -157,7 +157,7 @@ class Event extends Object
return; return;
} }
if ($event === null) { if ($event === null) {
$event = new self; $event = new static;
} }
$event->handled = false; $event->handled = false;
$event->name = $name; $event->name = $name;

Loading…
Cancel
Save