ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilContext Class Reference

Service context (factory) class. More...

+ Inheritance diagram for ilContext:
+ Collaboration diagram for ilContext:

Static Public Member Functions

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

Data Fields

const CONTEXT_WEB = "ilContextWeb"
 
const CONTEXT_CRON = "ilContextCron"
 
const CONTEXT_RSS = "ilContextRss"
 
const CONTEXT_ICAL = "ilContextIcal"
 
const CONTEXT_SOAP = "ilContextSoap"
 
const CONTEXT_WEBDAV = "ilContextWebdav"
 
const CONTEXT_RSS_AUTH = "ilContextRssAuth"
 
const CONTEXT_SESSION_REMINDER = "ilContextSessionReminder"
 
const CONTEXT_SOAP_WITHOUT_CLIENT = "ilContextSoapWithoutClient"
 
const CONTEXT_UNITTEST = "ilContextUnitTest"
 
const CONTEXT_REST = "ilContextRest"
 
const CONTEXT_SCORM = "ilContextScorm"
 
const CONTEXT_WAC = "ilContextWAC"
 
const CONTEXT_APACHE_SSO = 'ilContextApacheSSO'
 
const CONTEXT_SHIBBOLETH = 'ilContextShibboleth'
 

Static Protected Member Functions

static callContext ($a_method)
 Call current content. More...
 

Static Protected Attributes

static $class_name
 
static $type
 

Detailed Description

Member Function Documentation

◆ callContext()

static ilContext::callContext (   $a_method)
staticprotected

Call current content.

Parameters
string$a_method
Returns
bool

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

References array.

58  {
59  if(!self::$class_name)
60  {
61  self::init(self::CONTEXT_WEB);
62  }
63  return call_user_func(array(self::$class_name, $a_method));
64  }
Create styles array
The data for the language used.

◆ doAuthentication()

static ilContext::doAuthentication ( )
static

Try authentication.

Returns
bool

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

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

◆ getType()

static ilContext::getType ( )
static

◆ hasHTML()

static ilContext::hasHTML ( )
static

Has HTML output.

Returns
bool

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

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

110  {
111  return (bool)self::callContext("hasHTML");
112  }
+ Here is the caller graph for this function:

◆ hasUser()

static ilContext::hasUser ( )
static

Based on user authentication?

Returns
bool

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

Referenced by ilInitialisation\initHTML(), and ilInitialisation\initILIAS().

90  {
91  return (bool)self::callContext("hasUser");
92  }
+ Here is the caller graph for this function:

◆ init()

static ilContext::init (   $a_type)
static

Init context by type.

Parameters
string$a_type
Returns
bool

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

References $a_type.

Referenced by ilSoapAdministration\getClientInfoXML(), ilSoapAdministration\getInstallationInfoXML(), ilCronStartUp\initIlias(), ilCalendarRemoteAccessHandler\initIlias(), ilWebAccessChecker\initILIAS(), ilWebAccessChecker\setHeader(), and ilContextTest\testInit().

43  {
44  include_once "Services/Context/classes/class.".$a_type.".php";
45  self::$class_name = $a_type;
46  self::$type = $a_type;
47 
48  return true;
49  }
$a_type
Definition: workflow.php:93
+ Here is the caller graph for this function:

◆ initClient()

static ilContext::initClient ( )
static

Init client.

Returns
bool

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

Referenced by ilInitialisation\initILIAS().

130  {
131  return (bool)self::callContext("initClient");
132  }
+ Here is the caller graph for this function:

◆ supportsPersistentSessions()

static ilContext::supportsPersistentSessions ( )
static

Check if context supports persistent session handling.

false for cli context

Returns
bool

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

Referenced by ilInitialisation\determineClient(), and ilInitialisation\initILIAS().

162  {
163  return (bool) self::callContext('supportsPersistentSessions');
164  }
+ Here is the caller graph for this function:

◆ supportsRedirects()

static ilContext::supportsRedirects ( )
static

Are redirects supported?

Returns
bool

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

References $ilCtrl.

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

72  {
73  global $ilCtrl;
74 
75  // asynchronous calls must never be redirected
76  if($ilCtrl && $ilCtrl->isAsynch())
77  {
78  return false;
79  }
80 
81  return (bool)self::callContext("supportsRedirects");
82  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ usesHTTP()

static ilContext::usesHTTP ( )
static

Uses HTTP aka browser.

Returns
bool

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

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

100  {
101  return (bool)self::callContext("usesHTTP");
102  }
+ Here is the caller graph for this function:

◆ usesTemplate()

static ilContext::usesTemplate ( )
static

Uses template engine.

Returns
bool

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

Referenced by ilInitialisation\requireCommonIncludes().

120  {
121  return (bool)self::callContext("usesTemplate");
122  }
+ Here is the caller graph for this function:

Field Documentation

◆ $class_name

ilContext::$class_name
staticprotected

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

◆ $type

ilContext::$type
staticprotected

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

◆ CONTEXT_APACHE_SSO

const ilContext::CONTEXT_APACHE_SSO = 'ilContextApacheSSO'

◆ CONTEXT_CRON

const ilContext::CONTEXT_CRON = "ilContextCron"

◆ CONTEXT_ICAL

const ilContext::CONTEXT_ICAL = "ilContextIcal"

◆ CONTEXT_REST

const ilContext::CONTEXT_REST = "ilContextRest"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_RSS

const ilContext::CONTEXT_RSS = "ilContextRss"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_RSS_AUTH

const ilContext::CONTEXT_RSS_AUTH = "ilContextRssAuth"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_SCORM

const ilContext::CONTEXT_SCORM = "ilContextScorm"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_SESSION_REMINDER

const ilContext::CONTEXT_SESSION_REMINDER = "ilContextSessionReminder"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_SHIBBOLETH

const ilContext::CONTEXT_SHIBBOLETH = 'ilContextShibboleth'

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

Referenced by ilInitialisation\blockedAuthentication().

◆ CONTEXT_SOAP

const ilContext::CONTEXT_SOAP = "ilContextSoap"

◆ CONTEXT_SOAP_WITHOUT_CLIENT

const ilContext::CONTEXT_SOAP_WITHOUT_CLIENT = "ilContextSoapWithoutClient"

◆ CONTEXT_UNITTEST

const ilContext::CONTEXT_UNITTEST = "ilContextUnitTest"

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

Referenced by ilContextTest\contextProvider().

◆ CONTEXT_WAC

◆ CONTEXT_WEB

const ilContext::CONTEXT_WEB = "ilContextWeb"

◆ CONTEXT_WEBDAV

const ilContext::CONTEXT_WEBDAV = "ilContextWebdav"

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