Fix closures and adding parsed Actions

This commit is contained in:
Joas Schilling 2015-09-01 17:58:23 +02:00
parent d04021b1ac
commit 57c273b2da
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ class Manager implements IManager {
}
foreach ($this->appsClosures as $closure) {
$app = $closure;
$app = $closure();
if (!($app instanceof IApp)) {
throw new \InvalidArgumentException('The given notification app does not implement the IApp interface');
}
@ -90,7 +90,7 @@ class Manager implements IManager {
}
foreach ($this->notifiersClosures as $closure) {
$notifier = $closure;
$notifier = $closure();
if (!($notifier instanceof INotifier)) {
throw new \InvalidArgumentException('The given notification app does not implement the INotifier interface');
}

View File

@ -393,7 +393,7 @@ class Notification implements INotification {
if (!$action->isValidParsed()) {
throw new \InvalidArgumentException('The given parsed action is invalid');
}
$this->actions[] = $action;
$this->actionsParsed[] = $action;
return $this;
}