*/
class FeedConversationList extends ConversationList {
/**
- * decorator class name
- * @var string
+ * @see wcf\data\DatabaseObjectList::$decoratorClassName
*/
public $decoratorClassName = 'wcf\data\conversation\FeedConversation';
* @see wcf\data\DatabaseObjectList::readObjects()
*/
public function readObjects() {
- if ($this->objectIDs === null) $this->readObjectIDs();
- parent::readObjects();
-
- foreach ($this->objects as &$conversation) {
- $conversation = new $this->decoratorClassName($conversation);
+ if ($this->objectIDs === null) {
+ $this->readObjectIDs();
}
- unset($conversation);
+
+ parent::readObjects();
}
}
public $labelList = null;
/**
- * decorator class name
- * @var string
+ * @see wcf\data\DatabaseObjectList::$decoratorClassName
*/
public $decoratorClassName = 'wcf\data\conversation\ViewableConversation';
* @see wcf\data\DatabaseObjectList::readObjects()
*/
public function readObjects() {
- if ($this->objectIDs === null) $this->readObjectIDs();
+ if ($this->objectIDs === null) {
+ $this->readObjectIDs();
+ }
+
parent::readObjects();
$labels = $this->loadLabelAssignments();
- foreach ($this->objects as $conversationID => &$conversation) {
- $conversation = new $this->decoratorClassName($conversation);
-
+ foreach ($this->objects as $conversationID => $conversation) {
if (isset($labels[$conversationID])) {
foreach ($labels[$conversationID] as $label) {
$conversation->assignLabel($label);
}
}
}
- unset($conversation);
}
/**
*/
class SearchResultConversationMessageList extends ViewableConversationMessageList {
/**
- * @see wcf\data\conversation\message\ViewableConversationMessageList::$decoratorClassName
+ * @see wcf\data\DatabaseObjectList::$decoratorClassName
*/
public $decoratorClassName = 'wcf\data\conversation\message\SearchResultConversationMessage';
public $sqlOrderBy = 'conversation_message.time';
/**
- * decorator class name
- * @var string
+ * @see wcf\data\DatabaseObjectList::$decoratorClassName
*/
public $decoratorClassName = 'wcf\data\conversation\message\ViewableConversationMessage';
* @see wcf\data\DatabaseObjectList::readObjects()
*/
public function readObjects() {
- if ($this->objectIDs === null) $this->readObjectIDs();
+ if ($this->objectIDs === null) {
+ $this->readObjectIDs();
+ }
+
parent::readObjects();
- $messageIDs = array();
foreach ($this->objects as &$message) {
- if ($message->time > $this->maxPostTime) $this->maxPostTime = $message->time;
- $message = new $this->decoratorClassName($message);
+ if ($message->time > $this->maxPostTime) {
+ $this->maxPostTime = $message->time;
+ }
if ($message->attachments) {
$this->attachmentObjectIDs[] = $message->messageID;