ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContext Class Reference

Service context (factory) class. More...

+ Collaboration diagram for ilContext:

Static Public Member Functions

static init ($a_type)
 Init context by type.
static supportsRedirects ()
 Are redirects supported?
static hasUser ()
 Based on user authentication?
static usesHTTP ()
 Uses HTTP aka browser.
static hasHTML ()
 Has HTML output.
static usesTemplate ()
 Uses template engine.
static initClient ()
 Init client.
static doAuthentication ()
 Try authentication.
static getType ()
 Get context type.

Data Fields

const CONTEXT_WEB = 1
const CONTEXT_CRON = 2
const CONTEXT_RSS = 3
const CONTEXT_ICAL = 4
const CONTEXT_SOAP = 5
const CONTEXT_WEBDAV = 6
const CONTEXT_RSS_AUTH = 7
const CONTEXT_WEB_ACCESS_CHECK = 8
const CONTEXT_SESSION_REMINDER = 9
const CONTEXT_SOAP_WITHOUT_CLIENT = 10
const CONTEXT_UNITTEST = 11
const CONTEXT_REST = 12
const CONTEXT_SCORM = 13

Protected Member Functions

 getClassForType ($a_type)
 Get class name for type id.

Static Protected Member Functions

static callContext ($a_method)
 Call current content.

Static Protected Attributes

static $class_name
static $type

Detailed Description

Service context (factory) class.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilContext.php.

Member Function Documentation

static ilContext::callContext (   $a_method)
staticprotected

Call current content.

Parameters
string$a_method
Returns
bool

Definition at line 108 of file class.ilContext.php.

References init().

Referenced by doAuthentication(), hasHTML(), hasUser(), initClient(), supportsRedirects(), usesHTTP(), and usesTemplate().

{
if(!self::$class_name)
{
self::init(self::CONTEXT_WEB);
}
return call_user_func(array(self::$class_name, $a_method));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::doAuthentication ( )
static

Try authentication.

Returns
bool

Definition at line 190 of file class.ilContext.php.

References callContext().

Referenced by ilInitialisation\initILIAS().

{
return (bool)self::callContext("doAuthentication");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContext::getClassForType (   $a_type)
protected

Get class name for type id.

Parameters
int$a_type
Returns
string

Definition at line 57 of file class.ilContext.php.

Referenced by init().

{
switch($a_type)
{
case self::CONTEXT_WEB:
return "ilContextWeb";
case self::CONTEXT_CRON:
return "ilContextCron";
case self::CONTEXT_RSS:
return "ilContextRss";
case self::CONTEXT_ICAL:
return "ilContextIcal";
case self::CONTEXT_SOAP:
return "ilContextSoap";
case self::CONTEXT_WEBDAV:
return "ilContextWebdav";
case self::CONTEXT_RSS_AUTH:
return "ilContextRssAuth";
case self::CONTEXT_WEB_ACCESS_CHECK:
return "ilContextWebAccessCheck";
case self::CONTEXT_SESSION_REMINDER:
return "ilContextSessionReminder";
case self::CONTEXT_SOAP_WITHOUT_CLIENT:
return "ilContextSoapWithoutClient";
case self::CONTEXT_UNITTEST:
return "ilContextUnitTest";
case self::CONTEXT_REST:
return 'ilContextRest';
case self::CONTEXT_SCORM:
return 'ilContextScorm';
}
}

+ Here is the caller graph for this function:

static ilContext::getType ( )
static

Get context type.

Returns
int

Definition at line 200 of file class.ilContext.php.

References $type.

Referenced by ilSoapAdministration\initIlias(), ilMail\isSOAPEnabled(), and ilECSTaskScheduler\start().

{
return self::$type;
}

+ Here is the caller graph for this function:

static ilContext::hasHTML ( )
static

Has HTML output.

Returns
bool

Definition at line 160 of file class.ilContext.php.

References callContext().

Referenced by ilInitialisation\handleMaintenanceMode(), ilInitialisation\initILIAS(), and ilInitialisation\redirect().

{
return (bool)self::callContext("hasHTML");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::hasUser ( )
static

Based on user authentication?

Returns
bool

Definition at line 140 of file class.ilContext.php.

References callContext().

Referenced by ilInitialisation\initILIAS().

{
return (bool)self::callContext("hasUser");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::init (   $a_type)
static

Init context by type.

Parameters
int$a_type
Returns
bool

Definition at line 38 of file class.ilContext.php.

References $class_name, and getClassForType().

Referenced by callContext(), ilSoapAdministration\getClientInfoXML(), ilSoapAdministration\getInstallationInfoXML(), and ilCalendarRemoteAccessHandler\initIlias().

{
{
include_once "Services/Context/classes/class.".$class_name.".php";
self::$class_name = $class_name;
self::$type = $a_type;
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::initClient ( )
static

Init client.

Returns
bool

Definition at line 180 of file class.ilContext.php.

References callContext().

Referenced by ilInitialisation\initILIAS().

{
return (bool)self::callContext("initClient");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::supportsRedirects ( )
static

Are redirects supported?

Returns
bool

Definition at line 122 of file class.ilContext.php.

References $ilCtrl, and callContext().

Referenced by ilUserRequestTargetAdjustment\adjust(), ilAuthApache\login(), and ilInitialisation\redirect().

{
global $ilCtrl;
// asynchronous calls must never be redirected
if($ilCtrl && $ilCtrl->isAsynch())
{
return false;
}
return (bool)self::callContext("supportsRedirects");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::usesHTTP ( )
static

Uses HTTP aka browser.

Returns
bool

Definition at line 150 of file class.ilContext.php.

References callContext().

Referenced by ilUtil\_getHttpPath(), ilInitialisation\initClient(), ilInitialisation\initSettings(), ilInitialisation\initUser(), and ilInitialisation\redirect().

{
return (bool)self::callContext("usesHTTP");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilContext::usesTemplate ( )
static

Uses template engine.

Returns
bool

Definition at line 170 of file class.ilContext.php.

References callContext().

Referenced by ilInitialisation\requireCommonIncludes().

{
return (bool)self::callContext("usesTemplate");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilContext::$class_name
staticprotected

Definition at line 15 of file class.ilContext.php.

Referenced by init().

ilContext::$type
staticprotected

Definition at line 16 of file class.ilContext.php.

Referenced by getType().

const ilContext::CONTEXT_CRON = 2

Definition at line 19 of file class.ilContext.php.

Referenced by ilMail\isSOAPEnabled().

const ilContext::CONTEXT_ICAL = 4

Definition at line 21 of file class.ilContext.php.

Referenced by ilCalendarRemoteAccessHandler\initIlias().

const ilContext::CONTEXT_REST = 12

Definition at line 29 of file class.ilContext.php.

const ilContext::CONTEXT_RSS = 3

Definition at line 20 of file class.ilContext.php.

const ilContext::CONTEXT_RSS_AUTH = 7

Definition at line 24 of file class.ilContext.php.

const ilContext::CONTEXT_SCORM = 13

Definition at line 30 of file class.ilContext.php.

const ilContext::CONTEXT_SESSION_REMINDER = 9

Definition at line 26 of file class.ilContext.php.

const ilContext::CONTEXT_SOAP = 5

Definition at line 22 of file class.ilContext.php.

Referenced by ilSoapAdministration\initIlias().

const ilContext::CONTEXT_SOAP_WITHOUT_CLIENT = 10
const ilContext::CONTEXT_UNITTEST = 11

Definition at line 28 of file class.ilContext.php.

const ilContext::CONTEXT_WEB = 1

Definition at line 18 of file class.ilContext.php.

Referenced by ilECSTaskScheduler\start().

const ilContext::CONTEXT_WEB_ACCESS_CHECK = 8

Definition at line 25 of file class.ilContext.php.

const ilContext::CONTEXT_WEBDAV = 6

Definition at line 23 of file class.ilContext.php.


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