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