Definition at line 31 of file Notifier.php.
◆ __construct()
Definition at line 40 of file Notifier.php.
References $DIC, and ilDBConstants\T_INTEGER.
50 $this->db =
$db ?? $DIC->database();
51 $this->clock =
$clock ?? (
new Factory())->clock()->system();
53 $this->mark_as_notified_stmt = $this->db->prepareManip(
54 'INSERT INTO mail_cron_orphaned (mail_id, folder_id, ts_do_delete) VALUES (?, ?, ?)',
readonly ClockInterface $clock
readonly ilDBInterface $db
◆ markAsNotified()
ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::markAsNotified |
( |
ReportDto |
$collection_obj | ) |
|
|
private |
Definition at line 59 of file Notifier.php.
References ReportDto\getFolderObjects().
Referenced by ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier\send().
61 $notify_days_before = 1;
62 if ($this->mail_expiration_days > $this->mail_expiration_warning_days) {
63 $notify_days_before = $this->mail_expiration_days - $this->mail_expiration_warning_days;
66 $deletion_datetime = $this->clock->now()
67 ->modify(
'+ ' . $notify_days_before .
' days')
72 $folder_id = $folder_obj->getFolderId();
74 foreach ($folder_obj->getOrphanedMailObjects() as $mail_obj) {
75 $mail_id = $mail_obj->getMailId();
77 if ($i > 0 && $i % self::NOTIFICATION_MARKER_PING_THRESHOLD === 0) {
82 $this->mark_as_notified_stmt,
83 [$mail_id, $folder_id, $deletion_datetime->getTimestamp()]
◆ send()
ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::send |
( |
| ) |
|
◆ sendMail()
ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::sendMail |
( |
ReportDto |
$collection_obj | ) |
|
|
private |
◆ $clock
readonly ClockInterface ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::$clock |
|
private |
◆ $db
readonly ilDBInterface ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::$db |
|
private |
◆ $mark_as_notified_stmt
readonly ilDBStatement ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::$mark_as_notified_stmt |
|
private |
◆ MAIL_DELIVERY_PING_THRESHOLD
const int ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::MAIL_DELIVERY_PING_THRESHOLD = 25 |
|
private |
◆ NOTIFICATION_MARKER_PING_THRESHOLD
const int ILIAS\Mail\Cron\ExpiredOrOrphanedMails\Notifier::NOTIFICATION_MARKER_PING_THRESHOLD = 250 |
|
private |
The documentation for this class was generated from the following file:
- components/ILIAS/Mail/classes/Cron/ExpiredOrOrphanedMails/Notifier.php