diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-23 14:42:49 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-23 14:42:49 -0500 |
commit | 9ae83c639ef88e9274d21b1917357a3212d5988c (patch) | |
tree | 174a483ecaa84038cb80dd9a5b72da64caf9aa18 /app/Core/Event.php | |
parent | 4d007ec39fe808c28fe08516afe549aa5d0aeb42 (diff) |
Create TaskPosition model
Diffstat (limited to 'app/Core/Event.php')
-rw-r--r-- | app/Core/Event.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/Core/Event.php b/app/Core/Event.php index a32499d8..935f8b9c 100644 --- a/app/Core/Event.php +++ b/app/Core/Event.php @@ -69,7 +69,7 @@ class Event { if (! $this->isEventTriggered($eventName)) { - $this->events[] = $eventName; + $this->events[$eventName] = $data; if (isset($this->listeners[$eventName])) { @@ -119,6 +119,17 @@ class Event } /** + * Get a list of triggered events + * + * @access public + * @return array + */ + public function getEventData($eventName) + { + return isset($this->events[$eventName]) ? $this->events[$eventName] : array(); + } + + /** * Check if an event have been triggered * * @access public @@ -127,7 +138,7 @@ class Event */ public function isEventTriggered($eventName) { - return in_array($eventName, $this->events); + return isset($this->events[$eventName]); } /** |