Modules/Groupware/Email/Attachment/Facade.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Email_Attachment_Facade

Package: Default

Author
Thorsten Suckow-Homberg  

Properties

Propertyprivate\Conjoon_Modules_Groupware_Email_Attachment_Model_Attachment  $_attachmentModel= 'null'

Propertyprivate\Conjoon_Modules_Groupware_Email_Attachment_Facade  $_instance= 'null'
static

Propertyprivate\Conjoon_Modules_Groupware_Email_Item_Model_Item  $_itemModel= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Email_Item_Model_Item

Methods

methodprivate__clone( ) : void

methodprivate__construct( ) : void

methodpublicgenerateAttachmentKey(  $userId ) : string

Generates a unique id for an attachment. This id is a string with a length of 32 chars, alphanumeric.

Parameters
Name Type Description
$userId
Returns
Type Description
string
methodpublicgetAttachmentDownloadDataForUserId( mixed $attachmentKey, integer $attachmentId, \inter $userId ) : array

Returns download data for the required attachment, i.e. mime type, filename and content. The data will be returned in an associative array and is already prepared for sending to the client, i.e. the content to send has already been decoded if necessary.

Parameters
Name Type Description
$attachmentKey mixed
$attachmentId integer
$userId \inter
Returns
Type Description
array an assoc array with the keys "name", "mimeType" and "content", or null if item is not available.
Throws
Exception Description
\InvalidArgumentException
methodpublicgetInstance( ) : void
static

methodpublicisAttachmentDownloadableForUserId( string $attachmentKey, integer $attachmentId, integer $userId ) : boolean

Returns true if the user may download the attachment with the specified id, otherwise false.

Parameters
Name Type Description
$attachmentKey string

The key of the attachment to download

$attachmentId integer

The id of the attachment to download

$userId integer

The id of the user who requests the attachment being downloaded

Returns
Type Description
boolean true if he may download the attachment, otherwise false
Throws
Exception Description
\InvalidArgumentException
Documentation was generated by DocBlox 0.18.1.