PHP Class IMP_Compose_Attachment_Storage, horde

Author: Michael Slusarz ([email protected])
ファイルを表示 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_id string Attachment identifier.
$_tmpfile string Temporary file location.
$_user string Attachment owner.

Public Methods

Method Description
__construct ( string $user, string $id = null ) Constructor.
__get ( $name )
delete ( ) Delete data from storage.
exists ( ) : boolean Does the attachment exist in the storage backend?
gc ( ) 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 ( IMP_Compose_Linked_Metadata $md = null ) Save attachment metadata.
write ( string $filename, Horde_Mime_Part $part ) Write attachment to storage.

Protected Methods

Method Description
_read ( )
_write ( $filename, Horde_Mime_Part $part )

Method Details

__construct() public method

Constructor.
public __construct ( string $user, string $id = null )
$user string Attachment owner.
$id string Attachment identifier.

__get() public method

public __get ( $name )

_read() abstract protected method

See also: read()
abstract protected _read ( )

_write() abstract protected method

See also: write()
abstract protected _write ( $filename, Horde_Mime_Part $part )
$part Horde_Mime_Part

delete() abstract public method

Delete data from storage.
abstract public delete ( )

exists() abstract public method

Does the attachment exist in the storage backend?
abstract public exists ( ) : boolean
return boolean True if the file exists.

gc() public method

Garbage collection.
public gc ( )

getMetadata() public method

Return metadata about attachment.
public getMetadata ( ) : IMP_Compose_Linked_Metadata
return IMP_Compose_Linked_Metadata Metadata object.

getTempFile() public method

Writes attachment data to a temporary file.
public getTempFile ( ) : string
return string Temporary file path.

read() public method

Read attachment data from storage.
public read ( ) : Horde_Stream
return Horde_Stream Stream object containing data.

saveMetadata() public method

Save attachment metadata.
public saveMetadata ( IMP_Compose_Linked_Metadata $md = null )
$md IMP_Compose_Linked_Metadata Metadata object. Null will clear all metadata.

write() public method

Write attachment to storage.
public write ( string $filename, Horde_Mime_Part $part )
$filename string Filename containing attachment data.
$part Horde_Mime_Part Mime part object containing attachment metadata.

Property Details

$_id protected_oe property

Attachment identifier.
protected string $_id
return string

$_tmpfile protected_oe property

Temporary file location.
protected string $_tmpfile
return string

$_user protected_oe property

Attachment owner.
protected string $_user
return string