Copied!

Handler

Handler.php : 14
Interface

Methods

publiccountNotifications()

Handler.php : 67
public countNotifications(int $currentUserId[, NotificationQuery|null $query = null ]) : int

Parameters

Name Type Default value Description
$currentUserId int - -
$query NotificationQuery|null null -

Return values

int

publiccountPendingNotifications()

Handler.php : 43

Count users unread Notifications.

public countPendingNotifications(int $ownerId) : int

Parameters

Name Type Default value Description
$ownerId int - -

Return values

int

publiccreateNotification()

Handler.php : 23

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 - -

publicfindUserNotifications()

Handler.php : 62
public findUserNotifications(int $userId[, NotificationQuery|null $query = null ]) : array<string|int, Notification>

Parameters

Name Type Default value Description
$userId int - -
$query NotificationQuery|null null -

Return values

array<string|int, Notification>

publicgetNotificationById()

Handler.php : 52

Get Notification by its id.

public getNotificationById(int $notificationId) : Notification

Parameters

Name Type Default value Description
$notificationId int - -

Return values

Notification

publicloadUserNotifications()

Handler.php : 57
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 : 34

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