1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-11-01 14:20:07 +00:00
Tims-Chat/file/lib/system/cache/builder/RoomCacheBuilder.class.php

26 lines
715 B
PHP
Raw Normal View History

2011-11-26 15:47:28 +00:00
<?php
2013-01-19 19:36:40 +00:00
namespace chat\system\cache\builder;
2011-11-26 15:47:28 +00:00
/**
* Caches all chat rooms.
*
* @author Tim Düsterhus
2013-01-19 19:36:40 +00:00
* @copyright 2010-2013 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>
2013-01-19 19:36:40 +00:00
* @package be.bastelstu.chat
2011-11-26 15:47:28 +00:00
* @subpackage system.cache.builder
*/
2013-01-19 19:36:40 +00:00
class RoomCacheBuilder implements \wcf\system\cache\builder\ICacheBuilder {
2011-11-26 15:47:28 +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
2013-01-19 19:36:40 +00:00
$roomList = new \chat\data\room\RoomList();
2011-11-26 15:47:28 +00:00
$roomList->sqlOrderBy = "chat_room.position";
$roomList->readObjects();
2012-08-16 09:08:29 +00:00
return $roomList->getObjects();
2011-11-26 15:47:28 +00:00
}
}