28     protected static string $type = 
"";
    52     public static function init(
string $a_type): bool
    54         self::$class_name = $a_type;
    55         self::$type = $a_type;
    64     public static function directCall(
string $a_type, 
string $a_method)
    66         $class_name = $a_type;
    67         if ($class_name && method_exists($class_name, $a_method)) {
    68             return call_user_func(array($class_name, $a_method));
    78     protected static function callContext(
string $a_method, array $args = [])
    80         if (!self::$class_name) {
    83         return call_user_func_array([self::$class_name, $a_method], $args);
    94         if (isset($DIC[
"ilCtrl"])) {
    95             $ilCtrl = $DIC->ctrl();
    99         if ($ilCtrl && $ilCtrl->isAsynch()) {
   103         return (
bool) self::callContext(
"supportsRedirects");
   111         return (
bool) self::callContext(
"hasUser");
   119         return (
bool) self::callContext(
"usesHTTP");
   127         return (
bool) self::callContext(
"hasHTML");
   135         return (
bool) self::callContext(
"usesTemplate");
   143         return (
bool) self::callContext(
"initClient");
   151         return (
bool) self::callContext(
"doAuthentication");
   159         return (
bool) self::callContext(
"supportsPushMessages");
   177         return (
bool) self::callContext(
'supportsPersistentSessions');
   185         return (
bool) self::callContext(
'isSessionMainContext');
   190         return (
string) self::callContext(
'modifyHttpPath', [$httpPath]);
 static hasUser()
Based on user authentication? 
 
static usesHTTP()
Uses HTTP aka browser. 
 
static isSessionMainContext()
Context that are not only temporary in a session (e.g. 
 
const CONTEXT_LTI_PROVIDER
 
const CONTEXT_SOAP_NO_AUTH
 
static modifyHttpPath(string $httpPath)
 
const CONTEXT_SESSION_REMINDER
 
static string $class_name
 
static usesTemplate()
Uses template engine. 
 
static hasHTML()
Has HTML output. 
 
static callContext(string $a_method, array $args=[])
Call current content. 
 
const CONTEXT_SOAP_WITHOUT_CLIENT
 
static directCall(string $a_type, string $a_method)
Call context method directly without internal handling. 
 
static supportsPushMessages()
Supports push messages. 
 
static supportsPersistentSessions()
Check if context supports persistent session handling. 
 
static init(string $a_type)
Init context by type. 
 
static initClient()
Init client. 
 
static getType()
Get context type. 
 
static doAuthentication()
Try authentication. 
 
static supportsRedirects()
Are redirects supported?