IMP_Compose_LinkedAttachment
in package
Linked attachment data.
Tags
Table of Contents
Properties
- $_atc : IMP_Compose_Attachment_Storage
- Attachment data.
- $_id : string
- Attachment ID (filename in VFS).
- $_user : string
- Owner of the attachment.
Methods
- __construct() : mixed
- Constructor.
- convert() : mixed
- Convert filename from old (pre-6.1) format.
- delete() : bool|string
- Delete a linked attachment.
- keepDate() : int|null
- Return UNIX timestamp of linked attachment expiration time.
- sendData() : mixed
- Send data to the browser.
- sendNotification() : mixed
- Send notification to attachment owner.
- _getDeleteToken() : string
- Get/create the delete token.
Properties
$_atc
Attachment data.
protected
IMP_Compose_Attachment_Storage
$_atc
$_id
Attachment ID (filename in VFS).
protected
string
$_id
$_user
Owner of the attachment.
protected
string
$_user
Methods
__construct()
Constructor.
public
__construct(string $user[, string $id = null ]) : mixed
Parameters
- $user : string
-
Attachment owner.
- $id : string = null
-
ID of the attachment.
Tags
convert()
Convert filename from old (pre-6.1) format.
public
convert(string $ts, string $file) : mixed
Parameters
- $ts : string
-
Timestamp.
- $file : string
-
Filename.
Tags
delete()
Delete a linked attachment.
public
delete(string $token) : bool|string
Parameters
- $token : string
-
The delete token.
Return values
bool|string —Filename of deleted file, or false if file was not deleted.
keepDate()
Return UNIX timestamp of linked attachment expiration time.
public
static keepDate([bool $past = true ]) : int|null
Parameters
- $past : bool = true
-
If true, determine maximim creation time for expiration. If false, determine future expiration time.
Return values
int|null —UNIX timestamp, or null if attachments are not pruned.
sendData()
Send data to the browser.
public
sendData() : mixed
Tags
sendNotification()
Send notification to attachment owner.
public
sendNotification() : mixed
_getDeleteToken()
Get/create the delete token.
protected
_getDeleteToken([bool $create = false ]) : string
Parameters
- $create : bool = false
-
Create token if it doesn't exist?
Return values
string —The delete token, or null if it doesn't exist.