ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChatController Class Reference

Class ilObjTest. More...

+ Collaboration diagram for ilChatController:

Public Member Functions

 __construct ($a_ref_id)
 Constructor public.
 setRefId ($a_ref_id)
 getRefId ()
 execute ()

Data Fields

 $gui_obj
 $ref_id
 $cmd

Private Member Functions

 getCommand ()
 sets internal command

Detailed Description

Class ilObjTest.

Author
Stefan Meyer
Version
Id:
lass.ilChatController.php 12853 2006-12-15 13:36:31 +0000 (Fr, 15 Dez 2006) smeyer

Definition at line 32 of file class.ilChatController.php.

Constructor & Destructor Documentation

ilChatController::__construct (   $a_ref_id)

Constructor public.

Parameters
integerreference_id

Definition at line 44 of file class.ilChatController.php.

References $_GET, $_SESSION, getCommand(), and ilUtil\sendInfo().

{
$this->ref_id = (int) $a_ref_id;
$this->gui_obj =& new ilObjChatGUI(array(),$a_ref_id,true,false);
$this->gui_obj->object->chat_room->setRoomId((int) $_REQUEST["room_id"]);
$this->gui_obj->object->chat_room->setUserId($_SESSION["AccountId"]);
// CHECK HACK
if(!$this->gui_obj->object->chat_room->checkAccess())
{
unset($_REQUEST["room_id"]);
unset($_REQUEST["message"]);
ilUtil::sendInfo("You are not entitled to view this room",true);
}
$this->gui_obj->object->server_comm->setRecipientId((int) $_GET["p_id"]);
$this->getCommand();
}

+ Here is the call graph for this function:

Member Function Documentation

ilChatController::execute ( )

Definition at line 80 of file class.ilChatController.php.

References $cmd.

{
$this->gui_obj->$cmd();
}
ilChatController::getCommand ( )
private

sets internal command

Definition at line 89 of file class.ilChatController.php.

References $_GET, and $_POST.

Referenced by __construct().

{
if($_GET["cmd"] == 'gateway')
{
if(is_array($_POST["cmd"]))
{
$_GET["cmd"] = key($_POST["cmd"]);
}
// Workaround for Internet Explorer (IE). If a user presses
// the Enter in the message input field, IE does not send a
// "cmd" parameter. We fill in the command "input", because
// we can safely assume that the user intended to post the
// message.
else if (! $_POST["cmd"] && $_POST["message"])
{
$_GET["cmd"] = 'input';
}
else
{
$_GET["cmd"] = 'cancel';
}
}
if($_GET["cmd"])
{
$this->cmd = $_GET["cmd"];
}
else
{
$this->cmd = "showFrames";
}
if($_GET['vcard'] == 1 && (int)$_GET['user'])
{
$this->cmd = 'deliverVCard';
}
}

+ Here is the caller graph for this function:

ilChatController::getRefId ( )
Returns
integer ref_id

Definition at line 75 of file class.ilChatController.php.

References $ref_id.

{
return $this->ref_id;
}
ilChatController::setRefId (   $a_ref_id)
Parameters
integerref_id

Definition at line 67 of file class.ilChatController.php.

{
$this->ref_id = $a_ref_id;
}

Field Documentation

ilChatController::$cmd

Definition at line 37 of file class.ilChatController.php.

Referenced by execute().

ilChatController::$gui_obj

Definition at line 34 of file class.ilChatController.php.

ilChatController::$ref_id

Definition at line 36 of file class.ilChatController.php.

Referenced by getRefId().


The documentation for this class was generated from the following file: