ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilSessionReminderCheck Class Reference
+ Collaboration diagram for ilSessionReminderCheck:

Public Member Functions

 __construct (private GlobalHttpState $http, private Refinery $refinery, private ilLanguage $lng, private ilDBInterface $db, private ilIniFile $client_ini, private ilLogger $logger, private ClockInterface $clock, private ilSetting $settings)
 

Private Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ isAuthenticatedUsrSession()

ilSessionReminderCheck::isAuthenticatedUsrSession ( ?array  $data)
private

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

References ANONYMOUS_USER_ID.

Referenced by __construct().

170  : bool
171  {
172  return (
173  is_array($data) &&
174  isset($data['user_id']) &&
175  (int) $data['user_id'] > 0 &&
176  (int) $data['user_id'] !== ANONYMOUS_USER_ID
177  );
178  }
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 165 of file class.ilSessionReminderCheck.php.

Referenced by __construct().

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

◆ toJsonResponse()

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

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

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

Referenced by __construct().

158  : ResponseInterface
159  {
160  return $this->http->response()
161  ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
162  ->withBody(Streams::ofString(json_encode($data, JSON_THROW_ON_ERROR)));
163  }
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:

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