Allow trigger to path data

This commit is contained in:
Dennis Eichhorn 2017-04-14 14:03:47 +02:00
parent b5bb42b52e
commit 5b8a4283b3

View File

@ -75,7 +75,7 @@ class EventManager
/**
* {@inheritdoc}
*/
public function trigger(string $group, string $id = '') /* : void */
public function trigger(string $group, string $id = '', $data) /* : void */
{
if(!isset($this->callbacks[$group])) {
return;
@ -86,7 +86,7 @@ class EventManager
}
if (!$this->hasOutstanding($group)) {
$this->callbacks[$group]['func']();
$this->callbacks[$group]['func']($data);
if ($this->callbacks[$group]['remove']) {
$this->detach($group);