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