Class Attachment

com.woltlab.wcf.data.message.attachment.data.attachment

Description

Represents an attachment.

  • author: Marcel Werk
  • copyright: 2001-2009 WoltLab GmbH
  • license: GNU
DatabaseObject
   |
   --Attachment

Direct descendents

Class Description
AttachmentEditor Provides functions to manage attachments.

Variable Summary

Type Name
static array $containerTypeCache
string $contentPreview
static array $fileTypeGroups
string $fileTypeIcon

Method Summary

Return Name
Attachment __construct(integer $attachmentID, [array<mixed> $row = null])
void getContainerURL()
string getContentPreview()
string getFileTypeIcon()
void getHeight()
void getThumbnailHeight()
void getThumbnailWidth()
void getWidth()

Variables

$containerTypeCache

protected static array $containerTypeCache = null

cache of the container types


$contentPreview

protected string $contentPreview = null

preview of file contents


$fileTypeGroups

protected static array $fileTypeGroups = array(
'Music' => array('Aif', 'Mid', 'Mp3', 'Ogg', 'Wav', 'Aiff', 'M4a'),'System'=>array('Bat','Dll'),'Web'=>array('Css','Js'),'Database'=>array('Db'),'Image'=>array('Dmg','Img','Iso'),'TextDocument'=>array('Doc','Sxw','Odt','Swd'),'Picture'=>array('Png','Gif','Jpg','Jpeg','Tif','Tiff','Tga','Bmp','Psd'),'Html'=>array('Html','Htm','Shtml','Tpl','Mht'),'Text'=>array('Txt','Log','Sql','Rtf','Wri','Diff'),'Font'=>array('Otf','Ttf','Fon','Dfont'),'Archive'=>array('Zip','Rar','Ace','7z','Tar','Gz','Gzip','Tgz','Bz2','Sit','Sitx'),'SpreadSheet'=>array('Xls','Sxc','Ods','Csv'),//'Video' => array('Mpeg', 'Avi', 'Wma', 'Mpg'),
//'Xml' => array('Xml', 'Dtd'),
//'Flash' => array('Swf', 'Fla'),
'Java'=>array('Jar','Java','Class')//,
//'Php' => array('Php', 'Php3', 'Php4', 'Php5', 'Phtml')
)

list of the file types


$fileTypeIcon

protected string $fileTypeIcon = null

path to file type icon


Inherited variables from DatabaseObject

DatabaseObject::$data

Methods

__construct

public Attachment __construct(integer $attachmentID, [array<mixed> $row = null])

Creates a new Attachment object.

Parameters:

  • $attachmentID
  • $row

Redefinition of: DatabaseObject::__construct()


getContainerURL

public void getContainerURL()

Returns the url to the object that contains this attachment.

return string


getContentPreview

public string getContentPreview()

Returns an abstract of the file content.


getFileTypeIcon

public string getFileTypeIcon()

Returns the right file type icon for the given attachment.


getHeight

public void getHeight()


getThumbnailHeight

public void getThumbnailHeight()


getThumbnailWidth

public void getThumbnailWidth()


getWidth

public void getWidth()


Inherited methods from DatabaseObject

DatabaseObject::__construct(), DatabaseObject::handleData(), DatabaseObject::sort(), DatabaseObject::__get()