Project activity refactoring and listeners improvements

This commit is contained in:
Frédéric Guillot
2014-10-12 21:38:56 -04:00
parent 4061927d21
commit 074056352d
56 changed files with 695 additions and 1208 deletions

View File

@@ -69,11 +69,14 @@ class Event
{
if (! $this->isEventTriggered($eventName)) {
$this->lastEvent = $eventName;
$this->events[] = $eventName;
if (isset($this->listeners[$eventName])) {
foreach ($this->listeners[$eventName] as $listener) {
$this->lastEvent = $eventName;
if ($listener->execute($data)) {
$this->lastListener = get_class($listener);
}