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/user/online/location/ChatLocation.class.php

36 lines
1.0 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
* @copyright 2010-2013 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package be.bastelstu.chat
* @subpackage page
*/
class ChatLocation implements \wcf\system\user\online\location\IUserOnlineLocation {
/**
* @see wcf\system\user\online\location\IUserOnlineLocation::cache()
*/
public function cache(\wcf\data\user\online\UserOnline $user) {}
/**
* @see wcf\system\user\online\location\IUserOnlineLocation::get()
*/
public function get(\wcf\data\user\online\UserOnline $user, $languageVariable = '') {
$cache = data\room\Room::getCache();
if (isset($cache[$user->objectID])) {
if ($cache[$user->objectID]->canEnter()) {
return \wcf\system\WCF::getLanguage()->getDynamicVariable($languageVariable, array(
'room' => $cache[$user->objectID]
));
}
}
return '';
}
}