diff --git a/composer.json b/composer.json index 037b211..0d2f380 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "phpunit/phpunit": "4.8.*", - "satooshi/php-coveralls": "dev-master" + "satooshi/php-coveralls": "1.0.0" }, "minimum-stability": "dev" } diff --git a/src/Notifier.php b/src/Notifier.php index ca6baad..2b19e7d 100644 --- a/src/Notifier.php +++ b/src/Notifier.php @@ -66,7 +66,7 @@ public function __construct(TemplateParser $parser, Session $session, array $con public function notify($level, array $attributes = []) { if (isset($this->driver['levels'][$level])) { - $this->notifications[] = array_merge(['level' => $this->driver['levels'][$level]], $attributes); + $this->notifications[] = array_merge(['level' => $this->driver['levels'][$level], 'driver' => $this->driver], $attributes); $this->session->flash('notifications', $this->notifications); return $this; @@ -117,7 +117,9 @@ public function render() { if ($notifications = $this->session->get('notifications')) { foreach ($notifications as $key => $notification) { - $notifications[$key] = $this->parser->parse($this->driver['template'], $notification); + $driver = $notification['driver']; + unset($notification['driver']); + $notifications[$key] = $this->parser->parse($driver['template'], $notification); } if ( ! empty($notifications)) { @@ -214,4 +216,4 @@ function __toString() { return $this->render(); } -} \ No newline at end of file +}