a8986edb09e6d80060f5e71636e6d5eabc3495b5
[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 WoltLabSuite\Core\System\User\Notification\Object\Type
15 */
16 class UserProfileCommentUserNotificationObjectType extends AbstractUserNotificationObjectType implements ICommentUserNotificationObjectType {
17 /**
18 * @inheritDoc
19 */
20 protected static $decoratorClassName = CommentUserNotificationObject::class;
21
22 /**
23 * @inheritDoc
24 */
25 protected static $objectClassName = Comment::class;
26
27 /**
28 * @inheritDoc
29 */
30 protected static $objectListClassName = CommentList::class;
31
32 /**
33 * @inheritDoc
34 */
35 public function getOwnerID($objectID) {
36 $sql = "SELECT objectID
37 FROM wcf".WCF_N."_comment
38 WHERE commentID = ?";
39 $statement = WCF::getDB()->prepareStatement($sql);
40 $statement->execute([$objectID]);
41 $row = $statement->fetchArray();
42
43 return ($row ? $row['objectID'] : 0);
44 }
45 }