IMP_Compose_Attachment_Storage_AutoDetermine
extends IMP_Compose_Attachment_Storage
in package
Auto-determine attachment storage status based on IMP configuration and attachment data.
Tags
Table of Contents
Properties
- $link_url : Horde_Url
- $linked : bool
- $_id : string
- Attachment identifier.
- $_storage : IMP_Compose_Attachment_Storage
- The underlying storage driver.
- $_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?
$_id
Attachment identifier.
protected
string
$_id
$_storage
The underlying storage driver.
protected
IMP_Compose_Attachment_Storage
$_storage
$_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
Return values
Horde_Stream —Stream object containing data.
saveMetadata()
Save attachment metadata.
public
saveMetadata([mixed $md = null ]) : mixed
Parameters
- $md : mixed = null
-
Metadata object. Null will clear all metadata.
write()
Write attachment to storage.
public
write(mixed $filename, Horde_Mime_Part $part) : mixed
Parameters
- $filename : mixed
-
Filename containing attachment data.
- $part : Horde_Mime_Part
-
Mime part object containing attachment metadata.
_read()
protected
_read() : mixed
_write()
protected
_write(mixed $filename, Horde_Mime_Part $part) : mixed
Parameters
- $filename : mixed
- $part : Horde_Mime_Part