|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Class ilFileDataMail. More...
Inheritance 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 () | |
| 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, ILIAS\GlobalScreen\Provider\__construct(), checkReadWrite(), initAttachmentMaxUploadSize(), and MAILPATH.
Here is the call graph for this function:| ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) |
Definition at line 525 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
Here is the call 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 577 of file class.ilFileDataMail.php.
References $DIC, $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 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 211 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
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 469 of file class.ilFileDataMail.php.
References $ilDB, $res, and getStorage().
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 450 of file class.ilFileDataMail.php.
| ilFileDataMail::checkReadWrite | ( | ) |
check if directory is writable overwritten method from base class @access private
Definition at line 232 of file class.ilFileDataMail.php.
Referenced by __construct().
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 325 of file class.ilFileDataMail.php.
References getMailPath().
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 494 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, __deleteAttachmentDirectory(), and ilDBConstants\FETCHMODE_OBJECT.
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 695 of file class.ilFileDataMail.php.
References ilFile\$path, $source, ilMimeTypeUtil\APPLICATION__ZIP, ilFileDelivery\DISP_ATTACHMENT, getAbsoluteAttachmentPoolPathByFilename(), ilUtil\getASCIIFilename(), getAttachmentPathByMailId(), ilFileUtils\getValidFilename(), ilUtil\ilTempnam(), MAILPATH, and ilUtil\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.
| string | $fileName |
Definition at line 384 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 130 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
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 194 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 | ||
| ) |
| string | $md5FileHash | |
| int | $mailId |
OutOfBoundsException
Definition at line 141 of file class.ilFileDataMail.php.
References ilFile\$path, $res, ilUtil\getDir(), and getMailPath().
Here is the call graph for this function:
|
private |
| int | $mailId |
Definition at line 175 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 107 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) |
get mail path @access public
Definition at line 122 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 |
| $a_mail_id | |
| $a_usr_id |
Definition at line 410 of file class.ilFileDataMail.php.
Referenced by assignAttachmentsToDirectory(), and saveFile().
Here is the caller graph for this function:| ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 99 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 243 of file class.ilFileDataMail.php.
|
protected |
Definition at line 535 of file class.ilFileDataMail.php.
Referenced by __construct().
Here is the caller graph for this function:| ilFileDataMail::initDirectory | ( | ) |
init directory overwritten method @access public
Definition at line 83 of file class.ilFileDataMail.php.
References ilFileData\getPath(), and MAILPATH.
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 341 of file class.ilFileDataMail.php.
References 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 | ( | $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 429 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 | ( | $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 394 of file class.ilFileDataMail.php.
References saveFile().
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 281 of file class.ilFileDataMail.php.
References $name, ilUtil\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | $file | ) |
| array | $file |
Definition at line 306 of file class.ilFileDataMail.php.
References ilUtil\_sanitizeFilemame(), getMailPath(), ilUtil\moveUploadedFile(), and rotateFiles().
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 372 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
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 355 of file class.ilFileDataMail.php.
References unlinkFile().
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().