19 declare(strict_types=1);
69 foreach ($this->providers as $provider) {
70 yield $provider->getNotifications();
79 foreach ($this->providers as $provider) {
80 yield $provider->getAdministrativeNotifications();
92 $this->administrative_notifications = array_filter($this->administrative_notifications,
static function (
AdministrativeNotification $n) :
bool {
123 return (is_array($this->notifications) && count($this->notifications) > 0);
140 if (is_array($this->notifications)) {
142 foreach ($this->notifications as $notification) {
144 foreach ($notification->getNotifications() as $s_notification) {
145 if ($s_notification->getOldAmount() > 0) {
150 if ($notification->getOldAmount() > 0) {
169 if (is_array($this->notifications)) {
171 foreach ($this->notifications as $notification) {
173 foreach ($notification->getNotifications() as $s_notification) {
174 if ($s_notification->getNewAmount() > 0) {
179 if ($notification->getNewAmount() > 0) {
214 foreach ($this->notifications as $notification) {
216 foreach ($notification->getNotifications() as $item) {
218 $identifiers[] = $this->
hash($item->getProviderIdentification()->serialize());
220 $identifiers[] = $item->getProviderIdentification()->serialize();
225 $identifiers[] = $this->
hash($notification->getProviderIdentification()->serialize());
227 $identifiers[] = $notification->getProviderIdentification()->serialize();
Class MainNotificationCollector.
__construct(array $providers)
MetaBarMainCollector constructor.
Class AbstractBaseCollector.
getNotificationsIdentifiersAsArray(bool $hashed=false)
collectOnce()
Runs the Collection of all items from the providers.
getAmountOfOldNotifications()
Returns the sum of all old notifications values in the Standard Notifications.
getAmountOfNewNotifications()
Returns the sum of all new notifications values in the Standard Notifications.
cleanupItemsForUIRepresentation()
getItemsForUIRepresentation()
$administrative_notifications
Class StandardNotificationGroup Groups a set of Notification.
returnNotificationsFromProviders()
Generator yielding the Notifications from the set of providers.
filterItemsByVisibilty(bool $async_only=false)
sortItemsForUIRepresentation()
returnAdministrativeNotificationsFromProviders()
getAdministrativeNotifications()
prepareItemsForUIRepresentation()
getNotifications()
Returns the set of collected informations.