ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCalendarRemoteAccessHandler Class Reference

Handles requests from external calendar applications More...

+ Collaboration diagram for ilCalendarRemoteAccessHandler:

Public Member Functions

 __construct ()
 Constructor.
 getTokenHandler ()
 parseRequest ()
 Fetch client id, the chosen calendar...
 handleRequest ()
 Handle Request.

Protected Member Functions

 initTokenHandler ()
 initIlias ()

Private Attributes

 $token_handler = null

Detailed Description

Handles requests from external calendar applications

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

ilCalendarRemoteAccessHandler::__construct ( )

Constructor.

Returns

Definition at line 42 of file class.ilCalendarRemoteAccessHandler.php.

{
}

Member Function Documentation

ilCalendarRemoteAccessHandler::getTokenHandler ( )

Definition at line 46 of file class.ilCalendarRemoteAccessHandler.php.

References $token_handler.

Referenced by handleRequest().

{
}

+ Here is the caller graph for this function:

ilCalendarRemoteAccessHandler::handleRequest ( )

Handle Request.

Returns

Definition at line 73 of file class.ilCalendarRemoteAccessHandler.php.

References $GLOBALS, ilCalendarCategories\_getInstance(), exit, ilCalendarExport\export(), getTokenHandler(), initIlias(), initTokenHandler(), and ilCalendarCategories\MODE_REMOTE_ACCESS.

{
$this->initIlias();
$this->initTokenHandler();
if($this->getTokenHandler()->getIcal() and !$this->getTokenHandler()->isIcalExpired())
{
echo $this->getTokenHandler()->getIcal();
}
include_once './Services/Calendar/classes/Export/class.ilCalendarExport.php';
include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
$export = new ilCalendarExport($cats->getCategories());
$export->export();
$this->getTokenHandler()->setIcal($export->getExportString());
$this->getTokenHandler()->storeIcal();
echo $export->getExportString();
#echo nl2br($export->getExportString());
#$fp = fopen('ilias.ics', 'w');
#fwrite($fp,$export->getExportString());
$GLOBALS['ilAuth']->logout();
}

+ Here is the call graph for this function:

ilCalendarRemoteAccessHandler::initIlias ( )
protected

Definition at line 113 of file class.ilCalendarRemoteAccessHandler.php.

References $_POST, $GLOBALS, ilAuthFactory\CONTEXT_CALENDAR_TOKEN, and ilAuthFactory\setContext().

Referenced by handleRequest().

{
include_once './Services/Authentication/classes/class.ilAuthFactory.php';
$_POST['username'] = 'cal_auth_token';
$_POST['password'] = 'cal_auth_token';
include_once("Services/Init/classes/class.ilInitialisation.php");
$GLOBALS['ilInit'] = new ilInitialisation();
$GLOBALS['ilInit']->initILIAS();
$GLOBALS['lng']->loadLanguageModule('dateplaner');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarRemoteAccessHandler::initTokenHandler ( )
protected

Definition at line 104 of file class.ilCalendarRemoteAccessHandler.php.

References $_GET, and ilCalendarAuthenticationToken\lookupUser().

Referenced by handleRequest().

{
$this->token_handler = new ilCalendarAuthenticationToken(
$_GET['token']
);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarRemoteAccessHandler::parseRequest ( )

Fetch client id, the chosen calendar...

Returns

Definition at line 55 of file class.ilCalendarRemoteAccessHandler.php.

References $_COOKIE, $_GET, and $path_info_components.

{
if($_GET['client_id'])
{
$_COOKIE['ilClientId'] = $_GET['client_id'];
}
else
{
$path_info_components = explode('/',$_SERVER['PATH_INFO']);
$_COOKIE['ilClientId'] = $path_info_components[1];
}
}

Field Documentation

ilCalendarRemoteAccessHandler::$token_handler = null
private

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

Referenced by getTokenHandler().


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