1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-23 21:50:09 +00:00
Tims-Chat/file/lib/system/user/online/location/ChatLocation.class.php

37 lines
1.1 KiB
PHP
Raw Normal View History

2013-05-10 15:51:48 +00:00
<?php
namespace chat\system\user\online\location;
use chat\data;
/**
* Implementation of IUserOnlineLocation for the chat.
*
* @author Tim Düsterhus
2014-02-27 22:05:09 +00:00
* @copyright 2010-2014 Tim Düsterhus
2013-05-10 15:51:48 +00:00
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package be.bastelstu.chat
2013-05-13 16:31:57 +00:00
* @subpackage system.user.online.location
2013-05-10 15:51:48 +00:00
*/
class ChatLocation implements \wcf\system\user\online\location\IUserOnlineLocation {
/**
2013-05-13 16:31:57 +00:00
* @see \wcf\system\user\online\location\IUserOnlineLocation::cache()
2013-05-10 15:51:48 +00:00
*/
public function cache(\wcf\data\user\online\UserOnline $user) {}
/**
2013-05-13 16:31:57 +00:00
* @see \wcf\system\user\online\location\IUserOnlineLocation::get()
2013-05-10 15:51:48 +00:00
*/
public function get(\wcf\data\user\online\UserOnline $user, $languageVariable = '') {
2013-05-24 00:21:49 +00:00
$rooms = data\room\RoomCache::getInstance()->getRooms();
2014-02-28 22:07:51 +00:00
if (isset($rooms[$user->objectID])) {
if ($rooms[$user->objectID]->canEnter()) {
2013-05-10 15:51:48 +00:00
return \wcf\system\WCF::getLanguage()->getDynamicVariable($languageVariable, array(
2014-02-28 22:07:51 +00:00
'room' => $rooms[$user->objectID]
2013-05-10 15:51:48 +00:00
));
}
}
return '';
}
}