| ILIAS
    release_5-4 Revision v5.4.26-12-gabc799a52e6
    | 
Class ilFileDataMail. More...
 Inheritance diagram for ilFileDataMail:
 Inheritance diagram for ilFileDataMail: Collaboration diagram for ilFileDataMail:
 Collaboration diagram for ilFileDataMail:| Public Member Functions | |
| __construct ($a_user_id=0) | |
| Constructor call base constructors checks if directory is writable and sets the optional user_id.  More... | |
| initDirectory () | |
| init directory overwritten method @access public  More... | |
| getUploadLimit () | |
| getAttachmentsTotalSizeLimit () | |
| getMailPath () | |
| get mail path @access public  More... | |
| getAbsoluteAttachmentPoolPathPrefix () | |
| getAttachmentPathAndFilenameByMd5Hash (string $md5FileHash, int $mailId) | |
| getAttachmentPath ($a_filename, $a_mail_id) | |
| get the path of a specific attachment  More... | |
| adoptAttachments ($a_attachments, $a_mail_id) | |
| adopt attachments (in case of forwarding a mail)  More... | |
| checkReadWrite () | |
| check if directory is writable overwritten method from base class @access private  More... | |
| getUserFilesData () | |
| get all attachments of a specific user @access public  More... | |
| storeAsAttachment ($a_filename, $a_content) | |
| Store content as attachment.  More... | |
| storeUploadedFile ($file) | |
| copyAttachmentFile ($a_abs_path, $a_new_name) | |
| Copy files in mail directory.  More... | |
| rotateFiles ($a_path) | |
| rotate files with same name recursive method  More... | |
| unlinkFiles ($a_filenames) | |
| unlink files: expects an array of filenames e.g.  More... | |
| unlinkFile ($a_filename) | |
| unlink one uploaded file expects a filename e.g 'foo'  More... | |
| getAbsoluteAttachmentPoolPathByFilename (string $fileName) | |
| Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent.  More... | |
| saveFiles ($a_mail_id, array $a_attachments) | |
| Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...  More... | |
| saveFile ($a_mail_id, $a_attachment) | |
| save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...  More... | |
| checkFilesExist ($a_files) | |
| check if files exist  More... | |
| assignAttachmentsToDirectory ($a_mail_id, $a_sent_mail_id) | |
| assign attachments to mail directory  More... | |
| deassignAttachmentFromDirectory ($a_mail_id) | |
| dassign attachments from mail directory  More... | |
| __deleteAttachmentDirectory ($a_rel_path) | |
| deliverAttachmentsAsZip (string $basename, int $mailId, $files=[], $isDraft=false) | |
|  Public Member Functions inherited from ilFileData | |
| __construct () | |
| Constructor class bas constructor and read path of directory from ilias.ini setup an mail object @access public.  More... | |
| checkPath ($a_path) | |
| check if path exists and is writable  More... | |
| getPath () | |
| get Path @access public  More... | |
|  Public Member Functions inherited from ilFile | |
| __construct () | |
| Constructor get ilias object @access public.  More... | |
| deleteTrailingSlash ($a_path) | |
| delete trailing slash of path variables  More... | |
| Static Public Member Functions | |
| static | getStorage ($a_mail_id, $a_usr_id) | 
| static | _lookupDiskUsageOfUser ($user_id) | 
| Returns the number of bytes used on the harddisk for mail attachments, by the user with the specified user id.  More... | |
| Data Fields | |
| $user_id | |
| $mail_path | |
|  Data Fields inherited from ilFile | |
| $path | |
| $ilias | |
| Protected Member Functions | |
| initAttachmentMaxUploadSize () | |
| Protected Attributes | |
| $mail_max_upload_file_size | |
| $tmpDirectory | |
| $storageDirectory | |
| $db | |
| Private Member Functions | |
| getAttachmentPathByMailId (int $mailId) | |
Class ilFileDataMail.
Definition at line 21 of file class.ilFileDataMail.php.
| ilFileDataMail::__construct | ( | $a_user_id = 0 | ) | 
Constructor call base constructors checks if directory is writable and sets the optional user_id.
| integereger | user_id @access public | 
Definition at line 58 of file class.ilFileDataMail.php.
References $DIC, checkReadWrite(), and initAttachmentMaxUploadSize().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) | 
Definition at line 528 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Returns the number of bytes used on the harddisk for mail attachments, by the user with the specified user id.
| int | user id. | 
Definition at line 580 of file class.ilFileDataMail.php.
References $DIC, $row, $size, $user_id, ilUtil\dirsize(), ilDBConstants\FETCHMODE_ASSOC, and ilUtil\getDataDir().
Referenced by ilObjMailAccess\_lookupDiskUsageOfUser().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::adoptAttachments | ( | $a_attachments, | |
| $a_mail_id | |||
| ) | 
adopt attachments (in case of forwarding a mail)
| array | attachments | 
| integer | mail_id @access public | 
Definition at line 209 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::assignAttachmentsToDirectory | ( | $a_mail_id, | |
| $a_sent_mail_id | |||
| ) | 
assign attachments to mail directory
| integer | mail_id | 
| integer | key for directory assignment @access public | 
Definition at line 472 of file class.ilFileDataMail.php.
References $ilDB, $res, and getStorage().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::checkFilesExist | ( | $a_files | ) | 
check if files exist
| array | filenames to check @access public | 
Definition at line 453 of file class.ilFileDataMail.php.
| ilFileDataMail::checkReadWrite | ( | ) | 
check if directory is writable overwritten method from base class @access private
Definition at line 230 of file class.ilFileDataMail.php.
Referenced by __construct().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::copyAttachmentFile | ( | $a_abs_path, | |
| $a_new_name | |||
| ) | 
Copy files in mail directory.
This is used for sending ILIAS generated mails with attachments
| array | Array with files. Absolute path required @access public | 
Definition at line 328 of file class.ilFileDataMail.php.
References getMailPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::deassignAttachmentFromDirectory | ( | $a_mail_id | ) | 
dassign attachments from mail directory
| integer | mail_id @access public | 
Definition at line 497 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, $row, __deleteAttachmentDirectory(), and ilDBConstants\FETCHMODE_OBJECT.
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::deliverAttachmentsAsZip | ( | string | $basename, | 
| int | $mailId, | ||
| $files = [], | |||
| $isDraft = false | |||
| ) | 
| string | $basename | |
| int | $mailId | |
| array | $files | |
| bool | $isDraft | 
ILIAS\Filesystem\Exception\FileNotFoundException
ILIAS\Filesystem\Exception\IOException
| ilException | |
| ilFileUtilsException | 
Definition at line 698 of file class.ilFileDataMail.php.
References $files, ilFile\$path, $source, GuzzleHttp\Psr7\$stream, $target, ilMimeTypeUtil\APPLICATION__ZIP, ilFileDelivery\DISP_ATTACHMENT, getAbsoluteAttachmentPoolPathByFilename(), ilUtil\getASCIIFilename(), getAttachmentPathByMailId(), ilFileUtils\getValidFilename(), ilUtil\ilTempnam(), and ilUtil\zip().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::getAbsoluteAttachmentPoolPathByFilename | ( | string | $fileName | ) | 
Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent.
| string | $fileName | 
Definition at line 387 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
Referenced by deliverAttachmentsAsZip().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) | 
Definition at line 128 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getAttachmentPath | ( | $a_filename, | |
| $a_mail_id | |||
| ) | 
get the path of a specific attachment
| string | filename | 
| integer | mail_id | 
Definition at line 192 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPathByMailId(), and getMailPath().
Referenced by adoptAttachments().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash | ( | string | $md5FileHash, | 
| int | $mailId | ||
| ) | 
| string | $md5FileHash | |
| int | $mailId | 
OutOfBoundsException
Definition at line 139 of file class.ilFileDataMail.php.
References $files, ilFile\$path, $res, $row, ilUtil\getDir(), and getMailPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
| int | $mailId | 
Definition at line 173 of file class.ilFileDataMail.php.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) | 
Definition at line 105 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) | 
get mail path @access public
Definition at line 120 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), storeAsAttachment(), and storeUploadedFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
| $a_mail_id | |
| $a_usr_id | 
Definition at line 413 of file class.ilFileDataMail.php.
Referenced by assignAttachmentsToDirectory(), and saveFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getUploadLimit | ( | ) | 
Definition at line 97 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getUserFilesData | ( | ) | 
get all attachments of a specific user @access public
Definition at line 243 of file class.ilFileDataMail.php.
| 
 | protected | 
Definition at line 538 of file class.ilFileDataMail.php.
References PREG_SPLIT_DELIM_CAPTURE.
Referenced by __construct().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::initDirectory | ( | ) | 
init directory overwritten method @access public
Definition at line 81 of file class.ilFileDataMail.php.
References ilFileData\getPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::rotateFiles | ( | $a_path | ) | 
rotate files with same name recursive method
| string | filename @access private | 
Definition at line 344 of file class.ilFileDataMail.php.
References rotateFiles().
Referenced by rotateFiles(), storeAsAttachment(), and storeUploadedFile().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::saveFile | ( | $a_mail_id, | |
| $a_attachment | |||
| ) | 
save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
| integer | mail id of mail in sent box | 
| array | filenames to save @access public | 
Definition at line 432 of file class.ilFileDataMail.php.
References getStorage().
Referenced by saveFiles().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::saveFiles | ( | $a_mail_id, | |
| array | $a_attachments | ||
| ) | 
Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
| integer | $a_mail_id | id of mail in sent box | 
| array | $a_attachments | to save | 
Definition at line 397 of file class.ilFileDataMail.php.
References saveFile().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::storeAsAttachment | ( | $a_filename, | |
| $a_content | |||
| ) | 
Store content as attachment.
| object | $a_filename | |
| object | $a_content | 
Definition at line 284 of file class.ilFileDataMail.php.
References $a_content, $name, ilUtil\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | $file | ) | 
| array | $file | 
Definition at line 309 of file class.ilFileDataMail.php.
References ilUtil\_sanitizeFilemame(), getMailPath(), and rotateFiles().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::unlinkFile | ( | $a_filename | ) | 
unlink one uploaded file expects a filename e.g 'foo'
| string | filename to delete @access public | 
Definition at line 375 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::unlinkFiles | ( | $a_filenames | ) | 
unlink files: expects an array of filenames e.g.
array('foo','bar')
| array | filenames to delete @access public | 
Definition at line 358 of file class.ilFileDataMail.php.
References unlinkFile().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | protected | 
Definition at line 49 of file class.ilFileDataMail.php.
| 
 | protected | 
Definition at line 40 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
| ilFileDataMail::$mail_path | 
Definition at line 35 of file class.ilFileDataMail.php.
Referenced by getMailPath().
| 
 | protected | 
Definition at line 46 of file class.ilFileDataMail.php.
| 
 | protected | 
Definition at line 43 of file class.ilFileDataMail.php.
| ilFileDataMail::$user_id | 
Definition at line 28 of file class.ilFileDataMail.php.
Referenced by _lookupDiskUsageOfUser().