IMP_Compose_Attachment_Storage_Temp
extends IMP_Compose_Attachment_Storage
in package
Temporary data storage implementation for attachment data storage.
Stores data using Horde_VFS to ensure that data is persistent for the session. Compose data will be garbage collected at the end of a session (if a user logs out properly).
Tags
Table of Contents
Properties
- $link_url : Horde_Url
- $linked : bool
- $_ht : Horde_HashTable_Vfs
- The VFS HashTable object.
- $_id : string
- Attachment identifier.
- $_tmpfile : string
- Temporary file location.
- $_user : string
- Attachment owner.
Methods
- __construct() : mixed
- Constructor.
- __get() : mixed
- delete() : mixed
- Delete data from storage.
- exists() : bool
- Does the attachment exist in the storage backend?
- gc() : mixed
- Garbage collection.
- getMetadata() : IMP_Compose_Linked_Metadata
- Return metadata about attachment.
- getTempFile() : string
- Writes attachment data to a temporary file.
- read() : Horde_Stream
- Read attachment data from storage.
- saveMetadata() : mixed
- Save attachment metadata.
- write() : mixed
- Write attachment to storage.
- _read() : mixed
- _write() : mixed
Properties
$link_url read-only
public
Horde_Url
$link_url
The URL, if the attachment is linked.
$linked read-only
public
bool
$linked
Can this attachment be linked?
$_ht
The VFS HashTable object.
protected
Horde_HashTable_Vfs
$_ht
$_id
Attachment identifier.
protected
string
$_id
$_tmpfile
Temporary file location.
protected
string
$_tmpfile
$_user
Attachment owner.
protected
string
$_user
Methods
__construct()
Constructor.
public
__construct(mixed $user[, mixed $id = null ]) : mixed
Parameters
- $user : mixed
-
Attachment owner.
- $id : mixed = null
-
Attachment identifier.
__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
delete()
Delete data from storage.
public
delete() : mixed
exists()
Does the attachment exist in the storage backend?
public
exists() : bool
Return values
bool —True if the file exists.
gc()
Garbage collection.
public
gc() : mixed
getMetadata()
Return metadata about attachment.
public
getMetadata() : IMP_Compose_Linked_Metadata
Return values
IMP_Compose_Linked_Metadata —Metadata object.
getTempFile()
Writes attachment data to a temporary file.
public
getTempFile() : string
Tags
Return values
string —Temporary file path.
read()
Read attachment data from storage.
public
read() : Horde_Stream
Tags
Return values
Horde_Stream —Stream object containing data.
saveMetadata()
Save attachment metadata.
public
saveMetadata([IMP_Compose_Linked_Metadata $md = null ]) : mixed
Parameters
- $md : IMP_Compose_Linked_Metadata = null
-
Metadata object. Null will clear all metadata.
write()
Write attachment to storage.
public
write(string $filename, Horde_Mime_Part $part) : mixed
Parameters
- $filename : string
-
Filename containing attachment data.
- $part : Horde_Mime_Part
-
Mime part object containing attachment metadata.
Tags
_read()
protected
_read() : mixed
_write()
protected
_write(mixed $filename, Horde_Mime_Part $part) : mixed
Parameters
- $filename : mixed
- $part : Horde_Mime_Part