50af651f90fc4fabe7905febe1a263f53cf0baff
[GitHub/WoltLab/WCF.git] /
1 <?php
2 namespace wcf\system\user\notification\object\type;
3 use wcf\data\comment\Comment;
4 use wcf\data\comment\CommentList;
5 use wcf\system\user\notification\object\CommentUserNotificationObject;
6 use wcf\system\WCF;
7
8 /**
9 * Represents a comment notification object type.
10 *
11 * @author Alexander Ebert
12 * @copyright 2001-2016 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package com.woltlab.wcf
15 * @subpackage system.user.notification.object.type
16 * @category Community Framework
17 */
18 class UserProfileCommentUserNotificationObjectType extends AbstractUserNotificationObjectType implements ICommentUserNotificationObjectType {
19 /**
20 * @inheritDoc
21 */
22 protected static $decoratorClassName = CommentUserNotificationObject::class;
23
24 /**
25 * @inheritDoc
26 */
27 protected static $objectClassName = Comment::class;
28
29 /**
30 * @inheritDoc
31 */
32 protected static $objectListClassName = CommentList::class;
33
34 /**
35 * @inheritDoc
36 */
37 public function getOwnerID($objectID) {
38 $sql = "SELECT objectID
39 FROM wcf".WCF_N."_comment
40 WHERE commentID = ?";
41 $statement = WCF::getDB()->prepareStatement($sql);
42 $statement->execute([$objectID]);
43 $row = $statement->fetchArray();
44
45 return ($row ? $row['objectID'] : 0);
46 }
47 }