PHP Класс IMP_Compose_LinkedAttachment, horde

Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_atc IMP_Compose_Attachment_Storage Attachment data.
$_id string Attachment ID (filename in VFS).
$_user string Owner of the attachment.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_getDeleteToken ( boolean $create = false ) : string Get/create the delete token.

Описание методов

__construct() публичный Метод

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

_getDeleteToken() защищенный Метод

Get/create the delete token.
protected _getDeleteToken ( boolean $create = false ) : string
$create boolean Create token if it doesn't exist?
Результат string The delete token, or null if it doesn't exist.

convert() публичный Метод

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

delete() публичный Метод

Delete a linked attachment.
public delete ( string $token ) : boolean | string
$token string The delete token.
Результат boolean | string Filename of deleted file, or false if file was not deleted.

keepDate() публичный статический Метод

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.
Результат integer | null UNIX timestamp, or null if attachments are not pruned.

sendData() публичный Метод

Send data to the browser.
public sendData ( )

sendNotification() публичный Метод

Send notification to attachment owner.
public sendNotification ( )

Описание свойств

$_atc защищенное свойство

Attachment data.
protected IMP_Compose_Attachment_Storage $_atc
Результат IMP_Compose_Attachment_Storage

$_id защищенное свойство

Attachment ID (filename in VFS).
protected string $_id
Результат string

$_user защищенное свойство

Owner of the attachment.
protected string $_user
Результат string