One Hat Cyber Team
Your IP :
216.73.216.182
Server IP :
203.175.9.166
Server :
Linux tanggamus.iixcp.rumahweb.net 5.14.0-427.28.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 2 03:44:10 EDT 2024 x86_64
Server Software :
LiteSpeed
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
cite5577
/
www
/
lib
/
pkp
/
classes
/
notification
/
View File Name :
NotificationManagerDelegate.inc.php
<?php /** * @file classes/notification/NotificationManagerDelegate.inc.php * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2003-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class NotificationManagerDelegate * @ingroup notification * * @brief Abstract class to support notification manager delegates * that provide default implementation to the interface that defines * notification presentation data. It also introduce a method to be * extended by subclasses to update notification objects. */ import('lib.pkp.classes.notification.PKPNotificationOperationManager'); abstract class NotificationManagerDelegate extends PKPNotificationOperationManager { /** @var int NOTIFICATION_TYPE_... */ private $_notificationType; /** * Constructor. * @param $notificationType int NOTIFICATION_TYPE_... */ function __construct($notificationType) { $this->_notificationType = $notificationType; } /** * Get the current notification type this manager is handling. * @return int NOTIFICATION_TYPE_... */ function getNotificationType() { return $this->_notificationType; } /** * Define operations to update notifications. * @param $request PKPRequest Request object * @param $userIds array List of user IDs to notify * @param $assocType int ASSOC_TYPE_... * @param $assocId int ID corresponding to $assocType * @return boolean True iff success */ function updateNotification($request, $userIds, $assocType, $assocId) { return false; } /** * Check if this manager delegate can handle the * creation of the passed notification type. * @copydoc PKPNotificationOperationManager::createNotification() */ function createNotification($request, $userId = null, $notificationType = null, $contextId = null, $assocType = null, $assocId = null, $level = NOTIFICATION_LEVEL_NORMAL, $params = null, $suppressEmail = false, callable $mailConfigurator = null) { assert($notificationType == $this->getNotificationType() || $this->multipleTypesUpdate()); return parent::createNotification($request, $userId, $notificationType, $contextId, $assocType, $assocId, $level, $params, $suppressEmail, $mailConfigurator); } /** * Flag a notification manager that handles multiple notification * types inside the update method within the same call. Only set * this to true if you're sure the notification manager provides * all information for all notification types you're handling (via * the getNotification... methods). * @return boolean */ protected function multipleTypesUpdate() { return false; } }