f8856b004dde006de90d4b39b82520d6dfb57dfe
[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 for likes.
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 UserProfileCommentLikeUserNotificationObjectType 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\CommentLikeUserNotificationObject';
20
21 /**
22 * @see \wcf\system\user\notification\object\type\AbstractUserNotificationObjectType::$objectClassName
23 */
24 protected static $objectClassName = 'wcf\data\like\Like';
25
26 /**
27 * @see \wcf\system\user\notification\object\type\AbstractUserNotificationObjectType::$objectListClassName
28 */
29 protected static $objectListClassName = 'wcf\data\like\LikeList';
30
31 /**
32 * @see \wcf\system\user\notification\object\type\ICommentUserNotificationObjectType::getOwnerID()
33 */
34 public function getOwnerID($objectID) {
35 $sql = "SELECT objectUserID
36 FROM wcf".WCF_N."_like
37 WHERE likeID = ?";
38 $statement = WCF::getDB()->prepareStatement($sql);
39 $statement->execute(array($objectID));
40 $row = $statement->fetchArray();
41
42 return ($row ? $row['objectUserID'] : 0);
43 }
44 }