ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilFileDataMail. More...
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 public More... | |
getUploadLimit () | |
getAttachmentsTotalSizeLimit () | |
getMailPath () | |
get mail path 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 private More... | |
getUserFilesData () | |
get all attachments of a specific user 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 public. More... | |
checkPath ($a_path) | |
check if path exists and is writable More... | |
getPath () | |
get Path public More... | |
Public Member Functions inherited from ilFile | |
__construct () | |
Constructor get ilias object 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 public |
Definition at line 58 of file class.ilFileDataMail.php.
References $DIC, checkReadWrite(), and initAttachmentMaxUploadSize().
ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) |
Definition at line 528 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
|
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, $ilDB, ilFile\$path, $query, $res, $row, $size, $user_id, ilUtil\dirsize(), ilDBConstants\FETCHMODE_ASSOC, ilUtil\getDataDir(), and getMailPath().
Referenced by ilObjMailAccess\_lookupDiskUsageOfUser().
ilFileDataMail::adoptAttachments | ( | $a_attachments, | |
$a_mail_id | |||
) |
adopt attachments (in case of forwarding a mail)
array | attachments |
integer | mail_id public |
Definition at line 209 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
ilFileDataMail::assignAttachmentsToDirectory | ( | $a_mail_id, | |
$a_sent_mail_id | |||
) |
assign attachments to mail directory
integer | mail_id |
integer | key for directory assignment public |
Definition at line 472 of file class.ilFileDataMail.php.
ilFileDataMail::checkFilesExist | ( | $a_files | ) |
check if files exist
array | filenames to check public |
Definition at line 453 of file class.ilFileDataMail.php.
ilFileDataMail::checkReadWrite | ( | ) |
check if directory is writable overwritten method from base class private
Definition at line 230 of file class.ilFileDataMail.php.
Referenced by __construct().
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 public |
Definition at line 328 of file class.ilFileDataMail.php.
References getMailPath().
ilFileDataMail::deassignAttachmentFromDirectory | ( | $a_mail_id | ) |
dassign attachments from mail directory
integer | mail_id public |
Definition at line 497 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, $row, __deleteAttachmentDirectory(), and ilDBConstants\FETCHMODE_OBJECT.
ilFileDataMail::deliverAttachmentsAsZip | ( | string | $basename, |
int | $mailId, | ||
$files = [] , |
|||
$isDraft = false |
|||
) |
string | $basename | |
int | $mailId | |
array | $files | |
bool | $isDraft |
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().
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().
ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 128 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
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().
ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash | ( | string | $md5FileHash, |
int | $mailId | ||
) |
string | $md5FileHash | |
int | $mailId |
Definition at line 139 of file class.ilFileDataMail.php.
References $files, ilFile\$path, $res, $row, ilUtil\getDir(), and getMailPath().
|
private |
int | $mailId |
Definition at line 173 of file class.ilFileDataMail.php.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 105 of file class.ilFileDataMail.php.
ilFileDataMail::getMailPath | ( | ) |
get mail path public
Definition at line 120 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by _lookupDiskUsageOfUser(), adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), storeAsAttachment(), and storeUploadedFile().
|
static |
$a_mail_id | |
$a_usr_id |
Definition at line 413 of file class.ilFileDataMail.php.
ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 97 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
ilFileDataMail::getUserFilesData | ( | ) |
get all attachments of a specific user public
Definition at line 243 of file class.ilFileDataMail.php.
|
protected |
Definition at line 538 of file class.ilFileDataMail.php.
Referenced by __construct().
ilFileDataMail::initDirectory | ( | ) |
init directory overwritten method public
Definition at line 81 of file class.ilFileDataMail.php.
References ilFileData\getPath().
ilFileDataMail::rotateFiles | ( | $a_path | ) |
rotate files with same name recursive method
string | filename private |
Definition at line 344 of file class.ilFileDataMail.php.
Referenced by storeAsAttachment(), and storeUploadedFile().
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 public |
Definition at line 432 of file class.ilFileDataMail.php.
Referenced by saveFiles().
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().
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().
Referenced by ilSoapUtils\distributeMails().
ilFileDataMail::storeUploadedFile | ( | $file | ) |
array | $file |
Definition at line 309 of file class.ilFileDataMail.php.
References ilUtil\_sanitizeFilemame(), getMailPath(), and rotateFiles().
ilFileDataMail::unlinkFile | ( | $a_filename | ) |
unlink one uploaded file expects a filename e.g 'foo'
string | filename to delete public |
Definition at line 375 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
ilFileDataMail::unlinkFiles | ( | $a_filenames | ) |
unlink files: expects an array of filenames e.g.
array('foo','bar')
array | filenames to delete public |
Definition at line 358 of file class.ilFileDataMail.php.
References unlinkFile().
|
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().