Archived
1
0

Initial commit as of 2018-10-16

This commit is contained in:
Marcel
2018-10-16 18:28:42 +02:00
commit 29d7c2ffdc
3601 changed files with 358427 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
require_once 'Notification.php';
class NotificationGroup
{
protected $notifications;
protected $realCount;
public function __construct(array $notifications, $count)
{
$this->notifications = $notifications;
$this->realCount = $count;
}
public function message() {
if($this->realCount == 1) {
return $this->notifications[0]->messageForNotification($this->notifications[0]);
}
return $this->notifications[0]->messageForNotifications($this->notifications, $this->realCount);
}
public function __get($attribute)
{
return $this->notifications[0]->{$attribute};
}
public function __call($name, $arguments)
{
return call_user_func_array([$this->notifications[0], $name], $arguments);
}
}