Copied!

Handler

Handler.php : 13

Methods

publiccountNotifications()

Handler.php : 67
public countNotifications(int $currentUserId) : int

Parameters

Name Type Default value Description
$currentUserId int - -

Return values

int

publiccountPendingNotifications()

Handler.php : 42

Count users unread Notifications.

public countPendingNotifications(int $ownerId) : int

Parameters

Name Type Default value Description
$ownerId int - -

Return values

int

publiccreateNotification()

Handler.php : 22

Store Notification ValueObject in persistent storage.

public createNotification(CreateStruct $createStruct) : Notification

Parameters

Name Type Default value Description
$createStruct CreateStruct - -

Return values

Notification

publicdelete()

Handler.php : 72
public delete(Notification $notification) : void

Parameters

Name Type Default value Description
$notification Notification - -

publicgetNotificationById()

Handler.php : 51

Get Notification by its id.

public getNotificationById(int $notificationId) : Notification

Parameters

Name Type Default value Description
$notificationId int - -

Return values

Notification

publicloadUserNotifications()

Handler.php : 60
public loadUserNotifications(int $userId, int $offset, int $limit) : array<string|int, Notification>

Parameters

Name Type Default value Description
$userId int - -
$offset int - -
$limit int - -

Return values

array<string|int, Notification>

publicupdateNotification()

Handler.php : 33

Update Notification ValueObject in persistent storage.

public updateNotification(Notification $notification, UpdateStruct $updateStruct) : Notification

There's no edit feature but it's essential to mark Notification as read.

Parameters

Name Type Default value Description
$notification Notification - -
$updateStruct UpdateStruct - -

Return values

Notification