PHP Class IMP_Compose_LinkedAttachment, horde

Author: Michael Slusarz ([email protected])
显示文件 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_atc IMP_Compose_Attachment_Storage Attachment data.
$_id string Attachment ID (filename in VFS).
$_user string Owner of the attachment.

Public Methods

Method Description
__construct ( string $user, string $id = null ) Constructor.
convert ( string $ts, string $file ) Convert filename from old (pre-6.1) format.
delete ( string $token ) : boolean | string Delete a linked attachment.
keepDate ( boolean $past = true ) : integer | null Return UNIX timestamp of linked attachment expiration time.
sendData ( ) Send data to the browser.
sendNotification ( ) Send notification to attachment owner.

Protected Methods

Method Description
_getDeleteToken ( boolean $create = false ) : string Get/create the delete token.

Method Details

__construct() public method

Constructor.
public __construct ( string $user, string $id = null )
$user string Attachment owner.
$id string ID of the attachment.

_getDeleteToken() protected method

Get/create the delete token.
protected _getDeleteToken ( boolean $create = false ) : string
$create boolean Create token if it doesn't exist?
return string The delete token, or null if it doesn't exist.

convert() public method

Convert filename from old (pre-6.1) format.
public convert ( string $ts, string $file )
$ts string Timestamp.
$file string Filename.

delete() public method

Delete a linked attachment.
public delete ( string $token ) : boolean | string
$token string The delete token.
return boolean | string Filename of deleted file, or false if file was not deleted.

keepDate() public static method

Return UNIX timestamp of linked attachment expiration time.
public static keepDate ( boolean $past = true ) : integer | null
$past boolean If true, determine maximim creation time for expiration. If false, determine future expiration time.
return integer | null UNIX timestamp, or null if attachments are not pruned.

sendData() public method

Send data to the browser.
public sendData ( )

sendNotification() public method

Send notification to attachment owner.
public sendNotification ( )

Property Details

$_atc protected_oe property

Attachment data.
protected IMP_Compose_Attachment_Storage $_atc
return IMP_Compose_Attachment_Storage

$_id protected_oe property

Attachment ID (filename in VFS).
protected string $_id
return string

$_user protected_oe property

Owner of the attachment.
protected string $_user
return string