|
ILIAS
release_8 Revision v8.24
|
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 (int $a_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 | |
| int | $user_id |
| 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 | ( | int | $a_user_id = 0 | ) |
Definition at line 40 of file class.ilFileDataMail.php.
References $DIC, ILIAS\GlobalScreen\Provider\__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 | |
| int | $a_mail_id |
Definition at line 161 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 | ||
| ) |
Definition at line 404 of file class.ilFileDataMail.php.
References $ilDB, $res, and getStorage().
Here is the call graph for this function:| ilFileDataMail::checkFilesExist | ( | array | $a_files | ) |
| string[] | $a_files |
Definition at line 391 of file class.ilFileDataMail.php.
| ilFileDataMail::checkReadWrite | ( | ) |
Definition at line 173 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
| string | $a_abs_path | |
| string | $a_new_name |
Definition at line 288 of file class.ilFileDataMail.php.
References getMailPath().
Here is the call graph for this function:| ilFileDataMail::deassignAttachmentFromDirectory | ( | int | $a_mail_id | ) |
Definition at line 418 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 457 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 |
Filesystem\Exception\FileNotFoundException
| ILIAS |
Filesystem\Exception\IOException
| ilException | |
| ilFileUtilsException |
Definition at line 589 of file class.ilFileDataMail.php.
References ilFile\$path, and getAttachmentPathByMailId().
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 335 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
Here is the call graph for this function:| ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 91 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 144 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 100 of file class.ilFileDataMail.php.
References ilFile\$path, $res, ilFileUtils\getDir(), and getMailPath().
Here is the call graph for this function:
|
private |
Definition at line 131 of file class.ilFileDataMail.php.
References $query.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
Here is the caller graph for this function:| ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 76 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) |
Definition at line 86 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:
|
static |
Definition at line 356 of file class.ilFileDataMail.php.
Referenced by assignAttachmentsToDirectory(), and saveFile().
Here is the caller graph for this function:| ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 71 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 191 of file class.ilFileDataMail.php.
|
protected |
Definition at line 462 of file class.ilFileDataMail.php.
References 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 60 of file class.ilFileDataMail.php.
References ilFileData\getPath(), and MAILPATH.
Here is the call graph for this function:
|
private |
Definition at line 295 of file class.ilFileDataMail.php.
References ilFileUtils\rename(), and rotateFiles().
Referenced by rotateFiles(), 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>/...
| int | $a_mail_id | |
| string | $a_attachment |
Definition at line 371 of file class.ilFileDataMail.php.
References getStorage().
Referenced by saveFiles().
Here is the call graph for this function:
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 345 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 223 of file class.ilFileDataMail.php.
References $name, 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 267 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 320 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 309 of file class.ilFileDataMail.php.
References unlinkFile().
Here is the call graph for this function:
|
protected |
Definition at line 37 of file class.ilFileDataMail.php.
|
protected |
Definition at line 38 of file class.ilFileDataMail.php.
|
protected |
Definition at line 34 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
| string ilFileDataMail::$mail_path |
Definition at line 33 of file class.ilFileDataMail.php.
Referenced by getMailPath().
|
protected |
Definition at line 36 of file class.ilFileDataMail.php.
|
protected |
Definition at line 35 of file class.ilFileDataMail.php.
| int ilFileDataMail::$user_id |
Definition at line 32 of file class.ilFileDataMail.php.