ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMailCronOrphanedMailsDeletionProcessor Class Reference

ilMailCronOrphanedMailsDeletionProcessor More...

+ Collaboration diagram for ilMailCronOrphanedMailsDeletionProcessor:

Public Member Functions

 __construct (ilMailCronOrphanedMailsDeletionCollector $collector)
 
 processDeletion ()
 

Protected Attributes

 $collector
 
 $db
 
 $settings
 

Private Member Functions

 deleteMails ()
 
 deleteMarkedAsNotified ()
 Delete entries about notification. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailCronOrphanedMailsDeletionProcessor::__construct ( ilMailCronOrphanedMailsDeletionCollector  $collector)
Parameters
ilMailCronOrphanedMailsDeletionCollector$collector

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

31 {
32 global $DIC;
33
34 $this->collector = $collector;
35
36 $this->settings = $DIC->settings();
37 $this->db = $DIC->database();
38 }
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $collector, $DIC, and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteMails()

ilMailCronOrphanedMailsDeletionProcessor::deleteMails ( )
private

Definition at line 121 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

122 {
123 $this->db->manipulate('DELETE FROM mail WHERE ' . $this->db->in('mail_id', $this->collector->getMailIdsToDelete(), false, 'integer'));
124 }

Referenced by processDeletion().

+ Here is the caller graph for this function:

◆ deleteMarkedAsNotified()

ilMailCronOrphanedMailsDeletionProcessor::deleteMarkedAsNotified ( )
private

Delete entries about notification.

Definition at line 129 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

130 {
131 if ((int) $this->settings->get('mail_notify_orphaned') >= 1) {
132 $this->db->manipulate('DELETE FROM mail_cron_orphaned WHERE ' . $this->db->in('mail_id', $this->collector->getMailIdsToDelete(), false, 'integer'));
133 } else {
134 $this->db->manipulate('DELETE FROM mail_cron_orphaned');
135 }
136 }

References settings().

Referenced by processDeletion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processDeletion()

ilMailCronOrphanedMailsDeletionProcessor::processDeletion ( )

Definition at line 141 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

142 {
143 if (count($this->collector->getMailIdsToDelete()) > 0) {
144 // delete possible attachments ...
145 $this->deleteAttachments();
146
147 $this->deleteMails();
148 require_once './Services/Logging/classes/public/class.ilLoggerFactory.php';
150 'Deleted mail_ids: %s',
151 implode(', ', $this->collector->getMailIdsToDelete())
152 ));
153
154 $this->deleteMarkedAsNotified();
156 'Deleted mail_cron_orphaned mail_ids: %s',
157 implode(', ', $this->collector->getMailIdsToDelete())
158 ));
159 }
160 }
sprintf('%.4f', $callTime)
static getLogger($a_component_id)
Get component logger.

References deleteMails(), deleteMarkedAsNotified(), ilLoggerFactory\getLogger(), and sprintf.

+ Here is the call graph for this function:

Field Documentation

◆ $collector

ilMailCronOrphanedMailsDeletionProcessor::$collector
protected

Definition at line 15 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

Referenced by __construct().

◆ $db

ilMailCronOrphanedMailsDeletionProcessor::$db
protected

◆ $settings

ilMailCronOrphanedMailsDeletionProcessor::$settings
protected

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