ca4c8c491ee3bf488ce04324a02861825507f65e
[GitHub/WoltLab/WCF.git] /
1 <?php
2 namespace wcf\system\user\notification\event;
3 use wcf\data\user\notification\UserNotification;
4 use wcf\data\user\UserProfile;
5 use wcf\system\user\notification\object\IUserNotificationObject;
6
7 /**
8 * Provides a default implementation for objects sharing common data.
9 *
10 * @author Alexander Ebert
11 * @copyright 2001-2015 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package com.woltlab.wcf
14 * @subpackage system.user.notification.event
15 * @category Community Framework
16 */
17 abstract class AbstractSharedUserNotificationEvent extends AbstractUserNotificationEvent {
18 /**
19 * @see \wcf\system\user\notification\event\IUserNotificationEvent::setObject()
20 */
21 public function setObject(UserNotification $notification, IUserNotificationObject $object, UserProfile $author, array $additionalData = array()) {
22 parent::setObject($notification, $object, $author, $additionalData);
23
24 $this->prepare();
25 }
26
27 /**
28 * Provide specialized handlers with object ids, these ids will be collected and should be
29 * read once the first time data is requested from the notification event.
30 */
31 abstract protected function prepare();
32 }