e2bc2799b5e9376684333c11aac4ee8cc3f4a806
[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-2017 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 }