|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
Inheritance diagram for ilFileDataMail:
Collaboration diagram for ilFileDataMail:Public Member Functions | |
| __construct (public int $user_id=0) | |
| initDirectory () | |
| getUploadLimit () | |
| getAttachmentsTotalSizeLimit () | |
| getMailPath () | |
| getAbsoluteAttachmentPoolPathPrefix () | |
| getAttachmentPathAndFilenameByMd5Hash (string $md5FileHash, int $mailId) | |
| getAttachmentPath (string $a_filename, int $a_mail_id) | |
| adoptAttachments (array $a_attachments, int $a_mail_id) | |
| Adopt attachments (in case of forwarding a mail) More... | |
| checkReadWrite () | |
| getUserFilesData () | |
| storeAsAttachment (string $a_filename, string $a_content) | |
| storeUploadedFile (array $file) | |
| copyAttachmentFile (string $a_abs_path, string $a_new_name) | |
| Copy files in mail directory. More... | |
| unlinkFiles (array $a_filenames) | |
| unlinkFile (string $a_filename) | |
| 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 (int $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 (int $a_mail_id, string $a_attachment) | |
| Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More... | |
| checkFilesExist (array $a_files) | |
| assignAttachmentsToDirectory (int $a_mail_id, int $a_sent_mail_id) | |
| deassignAttachmentFromDirectory (int $a_mail_id) | |
| deliverAttachmentsAsZip (string $basename, int $mailId, array $files=[], bool $isDraft=false) | |
Public Member Functions inherited from ilFileData | |
| __construct () | |
| checkPath (string $a_path) | |
| getPath () | |
Public Member Functions inherited from ilFile | |
| deleteTrailingSlash (string $a_path) | |
| delete trailing slash of path variables More... | |
Static Public Member Functions | |
| static | getStorage (int $a_mail_id, int $a_usr_id) |
Data Fields | |
| string | $mail_path |
Protected Member Functions | |
| initAttachmentMaxUploadSize () | |
Protected Attributes | |
| int | $mail_max_upload_file_size |
| Filesystem | $tmpDirectory |
| Filesystem | $storageDirectory |
| ilDBInterface | $db |
| ILIAS | $ilias |
Protected Attributes inherited from ilFile | |
| string | $path |
Private Member Functions | |
| getAttachmentPathByMailId (int $mailId) | |
| rotateFiles (string $a_path) | |
| deleteAttachmentDirectory (string $a_rel_path) | |
This class handles all operations on files (attachments) in directory ilias_data/mail.
Definition at line 30 of file class.ilFileDataMail.php.
| ilFileDataMail::__construct | ( | public int | $user_id = 0 | ) |
Definition at line 39 of file class.ilFileDataMail.php.
References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), checkReadWrite(), ilFileData\getPath(), initAttachmentMaxUploadSize(), and MAILPATH.
Here is the call graph for this function:| ilFileDataMail::adoptAttachments | ( | array | $a_attachments, |
| int | $a_mail_id | ||
| ) |
Adopt attachments (in case of forwarding a mail)
| string[] | $a_attachments |
Definition at line 158 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
Here is the call graph for this function:| ilFileDataMail::assignAttachmentsToDirectory | ( | int | $a_mail_id, |
| int | $a_sent_mail_id | ||
| ) |
| ilFileDataMail::checkFilesExist | ( | array | $a_files | ) |
| string[] | $a_files |
Definition at line 379 of file class.ilFileDataMail.php.
| ilFileDataMail::checkReadWrite | ( | ) |
Definition at line 170 of file class.ilFileDataMail.php.
Referenced by __construct().
Here is the caller graph for this function:| ilFileDataMail::copyAttachmentFile | ( | string | $a_abs_path, |
| string | $a_new_name | ||
| ) |
Copy files in mail directory.
This is used for sending ILIAS generated mails with attachments
Definition at line 282 of file class.ilFileDataMail.php.
References getMailPath().
Here is the call graph for this function:| ilFileDataMail::deassignAttachmentFromDirectory | ( | int | $a_mail_id | ) |
Definition at line 406 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, deleteAttachmentDirectory(), ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Here is the call graph for this function:
|
private |
Definition at line 445 of file class.ilFileDataMail.php.
References ilFileUtils\delDir().
Referenced by deassignAttachmentFromDirectory().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::deliverAttachmentsAsZip | ( | string | $basename, |
| int | $mailId, | ||
| array | $files = [], |
||
| bool | $isDraft = false |
||
| ) |
| ILIAS |
Definition at line 577 of file class.ilFileDataMail.php.
References ilFile\$path, ilFileDelivery\deliverFileAttached(), getAbsoluteAttachmentPoolPathByFilename(), ilFileUtils\getASCIIFilename(), getAttachmentPathByMailId(), ilFileUtils\getValidFilename(), ilFileUtils\ilTempnam(), MAILPATH, and ilFileUtils\zip().
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.
Definition at line 327 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
Referenced by deliverAttachmentsAsZip().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 89 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
Here is the caller graph for this function:| ilFileDataMail::getAttachmentPath | ( | string | $a_filename, |
| int | $a_mail_id | ||
| ) |
Definition at line 142 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 caller graph for this function:| ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash | ( | string | $md5FileHash, |
| int | $mailId | ||
| ) |
| OutOfBoundsException |
Definition at line 98 of file class.ilFileDataMail.php.
References ilFile\$path, $res, ilFileUtils\getDir(), and getMailPath().
Referenced by ilMailFolderGUI\deliverFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 129 of file class.ilFileDataMail.php.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
Here is the caller graph for this function:| ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 74 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) |
Definition at line 84 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), initAttachmentMaxUploadSize(), storeAsAttachment(), and storeUploadedFile().
Here is the caller graph for this function:
|
static |
Definition at line 348 of file class.ilFileDataMail.php.
| ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 69 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
Here is the caller graph for this function:| ilFileDataMail::getUserFilesData | ( | ) |
Definition at line 188 of file class.ilFileDataMail.php.
|
protected |
Definition at line 450 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, getMailPath(), and ILIAS\Repository\int().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::initDirectory | ( | ) |
Definition at line 58 of file class.ilFileDataMail.php.
References ilFileData\getPath(), and MAILPATH.
Here is the call graph for this function:
|
private |
Definition at line 289 of file class.ilFileDataMail.php.
References ilFileUtils\rename().
Referenced by storeAsAttachment(), and storeUploadedFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::saveFile | ( | int | $a_mail_id, |
| string | $a_attachment | ||
| ) |
Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
Definition at line 360 of file class.ilFileDataMail.php.
Referenced by saveFiles().
Here is the caller graph for this function:| ilFileDataMail::saveFiles | ( | int | $a_mail_id, |
| array | $a_attachments | ||
| ) |
Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
| int | $a_mail_id | id of mail in sent box |
| string[] | $a_attachments to save |
Definition at line 337 of file class.ilFileDataMail.php.
References saveFile().
Here is the call graph for this function:| ilFileDataMail::storeAsAttachment | ( | string | $a_filename, |
| string | $a_content | ||
| ) |
Definition at line 220 of file class.ilFileDataMail.php.
References ilFileUtils\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | array | $file | ) |
| array{name:string,tmp_name:string} | $file |
Definition at line 264 of file class.ilFileDataMail.php.
References ilFileUtils\_sanitizeFilemame(), getMailPath(), ilFileUtils\moveUploadedFile(), and rotateFiles().
Here is the call graph for this function:| ilFileDataMail::unlinkFile | ( | string | $a_filename | ) |
Definition at line 314 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
Here is the caller graph for this function:| ilFileDataMail::unlinkFiles | ( | array | $a_filenames | ) |
| string[] | $a_filenames Filenames to delete |
Definition at line 303 of file class.ilFileDataMail.php.
References unlinkFile().
Here is the call graph for this function:
|
protected |
Definition at line 36 of file class.ilFileDataMail.php.
|
protected |
Definition at line 37 of file class.ilFileDataMail.php.
|
protected |
Definition at line 33 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
| string ilFileDataMail::$mail_path |
Definition at line 32 of file class.ilFileDataMail.php.
Referenced by getMailPath().
|
protected |
Definition at line 35 of file class.ilFileDataMail.php.
|
protected |
Definition at line 34 of file class.ilFileDataMail.php.