ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 readonly ilSetting $settings)
 

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 29 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,
private readonly ilSetting  $settings 
)

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

References $clientIni, $data, $db, $http, $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(), ILIAS\Repository\refinery(), ilDatePresentation\secondsToString(), ILIAS\Repository\settings(), ilUtil\stripSlashes(), ilCalendarSettings\TIME_FORMAT_12, ilCalendarSettings\TIME_FORMAT_24, and toJsonResponse().

48  {
49  $this->http = $http;
50  $this->refinery = $refinery;
51  $this->lng = $lng;
52  $this->db = $db;
53  $this->clientIni = $clientIni;
54  $this->logger = $logger;
55  $this->clock = $utcClock;
56  }
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 176 of file class.ilSessionReminderCheck.php.

References ANONYMOUS_USER_ID.

Referenced by __construct().

176  : bool
177  {
178  return (
179  is_array($data) &&
180  isset($data['user_id']) &&
181  (int) $data['user_id'] > 0 &&
182  (int) $data['user_id'] !== ANONYMOUS_USER_ID
183  );
184  }
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 171 of file class.ilSessionReminderCheck.php.

Referenced by __construct().

171  : bool
172  {
173  return $expirationTime < $this->clock->now()->getTimestamp();
174  }
+ Here is the caller graph for this function:

◆ toJsonResponse()

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

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

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

Referenced by __construct().

164  : ResponseInterface
165  {
166  return $this->http->response()
167  ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
168  ->withBody(Streams::ofString(json_encode($data, JSON_THROW_ON_ERROR)));
169  }
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 35 of file class.ilSessionReminderCheck.php.

Referenced by __construct().

◆ $clock

ClockInterface ilSessionReminderCheck::$clock
private

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

◆ $db

ilDBInterface ilSessionReminderCheck::$db
private

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

Referenced by __construct().

◆ $http

GlobalHttpState ilSessionReminderCheck::$http
private

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

Referenced by __construct().

◆ $lng

ilLanguage ilSessionReminderCheck::$lng
private

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

Referenced by __construct().

◆ $logger

ilLogger ilSessionReminderCheck::$logger
private

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

Referenced by __construct().

◆ $refinery

Refinery ilSessionReminderCheck::$refinery
private

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

Referenced by __construct().


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