ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSessionReminderCheck Class Reference
+ Collaboration diagram for ilSessionReminderCheck:

Public Member Functions

 __construct (GlobalHttpState $http, Refinery $refinery, ilLanguage $lng, ilDBInterface $db, ilIniFile $clientIni, ilLogger $logger, ClockInterface $utcClock)
 

Private Member Functions

 toJsonResponse ($data)
 
 isSessionAlreadyExpired (int $expirationTime)
 
 isAuthenticatedUsrSession (?array $data)
 

Private Attributes

GlobalHttpState $http
 
Refinery $refinery
 
ilLanguage $lng
 
ilDBInterface $db
 
ilIniFile $clientIni
 
ilLogger $logger
 
ClockInterface $clock
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSessionReminderCheck::__construct ( GlobalHttpState  $http,
Refinery  $refinery,
ilLanguage  $lng,
ilDBInterface  $db,
ilIniFile  $clientIni,
ilLogger  $logger,
ClockInterface  $utcClock 
)

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

References $clientIni, $data, $db, $http, $ilUser, $lng, $logger, $refinery, $res, $response, ilUtil\_getHttpPath(), ilSession\enableWebAccessWithoutSession(), ilObjectFactory\getInstanceByObjId(), ILIAS\FileDelivery\http(), IL_CAL_FKT_DATE, IL_CAL_UNIX, ILIAS\Repository\int(), isAuthenticatedUsrSession(), isSessionAlreadyExpired(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ilSessionReminder\MIN_LEAD_TIME, ILIAS\Repository\refinery(), ilDatePresentation\secondsToString(), ilUtil\stripSlashes(), ilCalendarSettings\TIME_FORMAT_12, ilCalendarSettings\TIME_FORMAT_24, and toJsonResponse().

46  {
47  $this->http = $http;
48  $this->refinery = $refinery;
49  $this->lng = $lng;
50  $this->db = $db;
51  $this->clientIni = $clientIni;
52  $this->logger = $logger;
53  $this->clock = $utcClock;
54  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ isAuthenticatedUsrSession()

ilSessionReminderCheck::isAuthenticatedUsrSession ( ?array  $data)
private

Definition at line 171 of file class.ilSessionReminderCheck.php.

References ANONYMOUS_USER_ID.

Referenced by __construct().

171  : bool
172  {
173  return (
174  is_array($data) &&
175  isset($data['user_id']) &&
176  (int) $data['user_id'] > 0 &&
177  (int) $data['user_id'] !== ANONYMOUS_USER_ID
178  );
179  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
+ Here is the caller graph for this function:

◆ isSessionAlreadyExpired()

ilSessionReminderCheck::isSessionAlreadyExpired ( int  $expirationTime)
private

Definition at line 166 of file class.ilSessionReminderCheck.php.

Referenced by __construct().

166  : bool
167  {
168  return $expirationTime < $this->clock->now()->getTimestamp();
169  }
+ Here is the caller graph for this function:

◆ toJsonResponse()

ilSessionReminderCheck::toJsonResponse (   $data)
private
Parameters
mixed$data
Returns
ResponseInterface

Definition at line 159 of file class.ilSessionReminderCheck.php.

References $data, and ILIAS\FileDelivery\http().

Referenced by __construct().

159  : ResponseInterface
160  {
161  return $this->http->response()
162  ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
163  ->withBody(Streams::ofString(json_encode($data, JSON_THROW_ON_ERROR)));
164  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $clientIni

ilIniFile ilSessionReminderCheck::$clientIni
private

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

Referenced by __construct().

◆ $clock

ClockInterface ilSessionReminderCheck::$clock
private

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

◆ $db

ilDBInterface ilSessionReminderCheck::$db
private

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

Referenced by __construct().

◆ $http

GlobalHttpState ilSessionReminderCheck::$http
private

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

Referenced by __construct().

◆ $lng

ilLanguage ilSessionReminderCheck::$lng
private

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

Referenced by __construct().

◆ $logger

ilLogger ilSessionReminderCheck::$logger
private

Definition at line 35 of file class.ilSessionReminderCheck.php.

Referenced by __construct().

◆ $refinery

Refinery ilSessionReminderCheck::$refinery
private

Definition at line 31 of file class.ilSessionReminderCheck.php.

Referenced by __construct().


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