Modules/Groupware/Files/Facade.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Files_Facade

Package: Default

Author
Thorsten Suckow-Homberg  

Properties

Propertyprivate\Conjoon_Modules_Groupware_Files_File_Facade  $_fileFacade= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Files_File_Facade
Propertyprivate\Conjoon_Modules_Groupware_Files_File_Model_File  $_fileModel= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Files_File_Model_File
Propertyprivate\Conjoon_Modules_Groupware_Files_Folder_Facade  $_folderFacade= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Files_Folder_Facade
Propertyprivate\Conjoon_Modules_Groupware_Files_Facade  $_instance= 'null'
static

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Files_Facade

Methods

methodprivate__clone( ) : void

methodprivate__construct( ) : void

methodprotected_checkArguments(  $data ) : void

Parameters
Name Type Description
$data
methodpublic_getUploadMaxFileSize( ) : float

Returns the number of bytes denoting the maximum file size for uploads.

Returns
Type Description
float
methodpublicaddFileDataToTempFolderForUser( string $name, resource | string $content, string $type,  $userId ) : mixed

Saves the file into the temp folder for the specified user and returns a Dto with further information about the file.

Parameters
Name Type Description
$name string
$content resource | string
$type string
$userId
Returns
Type Description
mixed null if an error occured, otherwise an instance of Conjoon_Groupware_Files_File_Dto
Throws
Exception Description
\InvalidArgumentException
methodpublicgenerateUploadObject( ) : \Zend_File_Transfer_Adapter_Http

Returns an upload object based on the global accessible $_FILES variable.

The returned upload will be pre-configured with a validator for the system's max upload size and the count of allowed simultaneusly uploads set to 1.

Returns
Type Description
\Zend_File_Transfer_Adapter_Http
methodpublicgetInstance( ) : void
static

methodpublicuploadFileToTempFolderForUser( \Zend_File_Transfer_Adapter_Http $upload, int $userId ) : null

Uploads the specified file found in $upload for the specified user to the temp folder.

As of know, only one file per upload is permitted. make sure the upload has been filtered and validated before passing it to this method

Parameters
Name Type Description
$upload \Zend_File_Transfer_Adapter_Http
$userId int
Returns
Type Description
null if an error occured or Conjoon_Groupware_Files_File_Dto
Throws
Exception Description
\InvalidArgumentException
\Conjoon_Modules_Groupware_Files_Exception
Documentation was generated by DocBlox 0.18.1.