ILIAS
trunk Revision v11.0_alpha-1811-gd2d5443e411
|
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
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 (UploadResult $result) | |
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) | |
![]() | |
__construct () | |
checkPath (string $a_path) | |
getPath () | |
![]() | |
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 |
![]() | |
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 31 of file class.ilFileDataMail.php.
ilFileDataMail::__construct | ( | public int | $user_id = 0 | ) |
Definition at line 40 of file class.ilFileDataMail.php.
References $DIC, ILIAS\GlobalScreen\Provider\__construct(), checkReadWrite(), ilFileData\getPath(), initAttachmentMaxUploadSize(), and MAILPATH.
ilFileDataMail::adoptAttachments | ( | array | $a_attachments, |
int | $a_mail_id | ||
) |
Adopt attachments (in case of forwarding a mail)
string[] | $a_attachments |
Definition at line 159 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
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 171 of file class.ilFileDataMail.php.
Referenced by __construct().
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().
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().
|
private |
Definition at line 445 of file class.ilFileDataMail.php.
References ilFileUtils\delDir().
Referenced by deassignAttachmentFromDirectory().
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().
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().
ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 90 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
ilFileDataMail::getAttachmentPath | ( | string | $a_filename, |
int | $a_mail_id | ||
) |
Definition at line 143 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPathByMailId(), and getMailPath().
Referenced by adoptAttachments().
ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash | ( | string | $md5FileHash, |
int | $mailId | ||
) |
OutOfBoundsException |
Definition at line 99 of file class.ilFileDataMail.php.
References ilFile\$path, $res, ilFileUtils\getDir(), and getMailPath().
Referenced by ilMailFolderGUI\deliverFile().
|
private |
Definition at line 130 of file class.ilFileDataMail.php.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 75 of file class.ilFileDataMail.php.
References null.
ilFileDataMail::getMailPath | ( | ) |
Definition at line 85 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), initAttachmentMaxUploadSize(), storeAsAttachment(), and storeUploadedFile().
|
static |
Definition at line 348 of file class.ilFileDataMail.php.
ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 70 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
ilFileDataMail::getUserFilesData | ( | ) |
Definition at line 189 of file class.ilFileDataMail.php.
References $user_id.
|
protected |
Definition at line 450 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, getMailPath(), and ILIAS\Repository\int().
Referenced by __construct().
ilFileDataMail::initDirectory | ( | ) |
Definition at line 59 of file class.ilFileDataMail.php.
References ilFileData\getPath(), and MAILPATH.
|
private |
Definition at line 289 of file class.ilFileDataMail.php.
References ilFileUtils\rename().
Referenced by storeAsAttachment(), and storeUploadedFile().
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().
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().
ilFileDataMail::storeAsAttachment | ( | string | $a_filename, |
string | $a_content | ||
) |
Definition at line 221 of file class.ilFileDataMail.php.
References ilFileUtils\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
ilFileDataMail::storeUploadedFile | ( | UploadResult | $result | ) |
Definition at line 262 of file class.ilFileDataMail.php.
References $filename, ilFileUtils\_sanitizeFilemame(), getMailPath(), ILIAS\FileUpload\DTO\UploadResult\getName(), ILIAS\FileUpload\DTO\UploadResult\getPath(), ilFileUtils\moveUploadedFile(), and rotateFiles().
ilFileDataMail::unlinkFile | ( | string | $a_filename | ) |
Definition at line 314 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
ilFileDataMail::unlinkFiles | ( | array | $a_filenames | ) |
string[] | $a_filenames Filenames to delete |
Definition at line 303 of file class.ilFileDataMail.php.
References unlinkFile().
|
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.