2011-11-26 15:47:28 +00:00
|
|
|
<?php
|
|
|
|
namespace wcf\system\cache\builder;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Caches all chat rooms.
|
|
|
|
*
|
|
|
|
* @author Tim Düsterhus
|
2012-01-28 16:50:33 +00:00
|
|
|
* @copyright 2010-2012 Tim Düsterhus
|
2011-11-26 15:47:28 +00:00
|
|
|
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
2012-03-12 16:18:15 +00:00
|
|
|
* @package be.bastelstu.wcf.chat
|
2011-11-26 15:47:28 +00:00
|
|
|
* @subpackage system.cache.builder
|
|
|
|
*/
|
|
|
|
class ChatRoomCacheBuilder implements ICacheBuilder {
|
|
|
|
/**
|
2012-02-26 16:55:44 +00:00
|
|
|
* @see \wcf\system\cache\ICacheBuilder::getData()
|
2011-11-26 15:47:28 +00:00
|
|
|
*/
|
|
|
|
public function getData(array $cacheResource) {
|
|
|
|
// get all chat rooms
|
|
|
|
$roomList = new \wcf\data\chat\room\ChatRoomList();
|
|
|
|
$roomList->sqlOrderBy = "chat_room.position";
|
|
|
|
$roomList->sqlLimit = 0;
|
|
|
|
$roomList->readObjects();
|
|
|
|
|
2012-08-16 09:08:29 +00:00
|
|
|
return $roomList->getObjects();
|
2011-11-26 15:47:28 +00:00
|
|
|
}
|
|
|
|
}
|