40251b4440f1445874e5072e4675bf2c20d05121
[GitHub/WoltLab/WCF.git] /
1 <?php
2 namespace wcf\system\message\embedded\object;
3 use wcf\data\user\UserList;
4 use wcf\data\user\UserProfile;
5
6 /**
7 * IMessageEmbeddedObjectHandler implementation for quotes.
8 *
9 * @author Marcel Werk
10 * @copyright 2001-2014 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package com.woltlab.wcf
13 * @subpackage system.message.embedded.object
14 * @category Community Framework
15 */
16 class QuoteMessageEmbeddedObjectHandler extends AbstractMessageEmbeddedObjectHandler {
17 /**
18 * @see \wcf\system\message\embedded\object\IMessageEmbeddedObjectHandler::parseMessage()
19 */
20 public function parseMessage($message) {
21 $usernames = self::getFirstParameters($message, 'quote');
22 if (!empty($usernames)) {
23 $userList = new UserList();
24 $userList->getConditionBuilder()->add("user_table.username IN (?)", array($usernames));
25 $userList->readObjectIDs();
26 return $userList->getObjectIDs();
27 }
28
29 return false;
30 }
31
32 /**
33 * @see \wcf\system\message\embedded\object\IMessageEmbeddedObjectHandler::loadObjects()
34 */
35 public function loadObjects(array $objectIDs) {
36 return UserProfile::getUserProfiles($objectIDs);
37 }
38 }